Search Posts

Category: firebase-database

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 = […]

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[]>; […]

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” […]