Search Posts

Category: firebase

Datetime-local not working with firebase-database

I’m trying to insert 4 values into my firebase-database (Equipment, Type, start of downtime and end of downtime). The start and end of downtime values are in datetime-local. When I try inserting the values it only makes nodes for the first 2 values being equipment and type. I don’t know why its not inserting the datetime-local values. MY HTML <div class=”row”> <div class=”col-xs-12″> <div class=”form-group col-xs-6 col-xs-offset-3″ id=”equipList”> <label for=”selectequ”>Select Equipment</label> <select class=”form-control” id=”selectequ” data-ng-model=”equipment” […]

My loop is only displaying the last data value in my view – firebase

I’m trying to display all the equipment list that i retrieve from the firebase database using angular.foreach but when ever i try to display the retrieved values in my view it only displays the last value. Need help! My JS /*global angular*/ var app = angular.module(‘sdt’, [‘ngRoute’, ‘firebase’]); app.config([‘$routeProvider’, function ($routeProvider) { ‘use strict’; $routeProvider.when(‘/sdt’, { templateUrl: ‘searchdowntime/sdt.html’, controller: ‘sdtCtrl’ }); }]); app.controller(‘sdtCtrl’, [‘$scope’, ‘$firebaseObject’, ‘$firebaseArray’, function ($scope, $firebaseObject, $firebaseArray) { ‘use strict’; var ref […]

Child Class auto generates id when pushing data in firebase database

I am trying to push data into by firebase database using angularjs. I used the system as the key and then the equipment as the child, but when i push the data it generates a key and under that it stores the equipment. I want it to store my data like so: System -> Equipment1 -> Equipment2 -> Equipment3 System2 -> Equipment1 -> Equipment2 -> Equipment3 Here is my code: /*global angular*/ var app = […]

"Angular not defined" using Mobile Angular UI and Angularfire

I’m trying to implement a mobile app using mobile angular ui with a firebase data base. But I can’t include firebase without getting this error: Uncaught ReferenceError: angular is not defined at angularfire.min.js:1 at angularfire.min.js:1 I don’t understand why this happens, because I include angular before the other dependencies? (not the “normal” angular but mobile-angular-ui) <!DOCTYPE html> <html> <head> <meta charset=”utf-8″ /> <title>(…)</title> <meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″ /> <meta name=”apple-mobile-web-app-capable” content=”yes” /> <meta name=”viewport” content=”user-scalable=no, initial-scale=1.0, […]

Match Fetched Data from 2 different References

My Json Object: “order” : [ $key1 { “state”: ‘active’, “name”: ‘Order#55’ }, $key2 { “state”: ‘active’, “name”: ‘Order#56′ } ] “products”: [ $key1{[ $productkey1{name:’Item’ desc: ‘description’ }, $productkey2{name:’Item’ desc: ‘description’ } }], “key2″[] ……. ]} My Html View I want to have an Html file like this picture. So: FirebaseListObservable<Order[]> FirebaseListObservable<Product[]> Each card will have the order and inside a list from the order’s products. My wrong code that fetches the data! Ref$: FirebaseListObservable<any[]>; […]

How to upload file.mp3 to firebase storage in ionic?

I am creating an audio recording function in my ionic app. I am using media plugin: $ ionic cordova plugin add cordova-plugin-media $ npm install –save @ionic-native/media I can record the audio and play it successfully like this: constructor(private media: Media,private base64: Base64) { this.file = this.media.create(‘file.mp3’); } record_audio(){ this.file.startRecord(); } to uplaod to firebase I cannot directly upload the file.mp3, looks like I need to convert it to Blob or base64 first so I […]

Firebase auth != null I can write but can’t read

I have been dealing with the authorization in Firebase for two days now and I can’t get it to work. Plenty of reading in the documentation and here in stackoverflow and still don’t get it. This is how my rules look like… { “rules”: { “.read”: false, “.write”: false, “notes”: { “.read”: “auth != null”, “.write”: “auth != null”, “.indexOn”: “uid” } } } My data looks like this… user-notes |_notes |_-ugly_id_for_this_record | |–date: “Sat […]

Looping between child nodes in firebase

I am working on a fantasy web-application of about 50 players. Below is a mock database for my web app: Users { John: { Selection: [1,2,3] }, Mark: { Selection: [1,2,4] } } Players { 1: { name: ‘Messi’, agility: 90 }, 2: { name: ‘Beckham’, agility: 54 }, 3: { name: ‘Rooney’, agility: 10 }, 4: { name: ‘Neymar’, agility: 84 } } After the client has made their selection as “Mark” and “John” […]

Adding automatically generated key in Firebase using Angular JS

I’m currently working with Angular 1.4.5 and Firebase 4.3.0 and have some questions need to ask. I want to know that how can I add the key which is generated automatically by Firebase into the data of particular item. For example, by following the tutorial, I’ve managed to store the user ID generated by Firebase using uid my Firebase data structure: And this is the code myApp.factory(‘Authentication’, [‘$rootScope’, ‘$location’, ‘$firebaseObject’,’$firebaseAuth’,function($rootScope, $location, $firebaseObject, $firebaseAuth){ var ref […]

Next Page »