angularjs,firebase,angularfireRelated issues-Collection of common programming errors
Davin Tryon
git angularjs ubuntu yeoman
I already have npm and git installed on my Ubuntu machine. When I started with Yeoman, I installed it with the following commands:npm install -g yo npm install -g generator-webapp npm install -g generator-angularThen I ran the following commands in my machine’s terminal:mkdir MyProject cd MyProject git init yo angular grunt serveand receieved the following error:Fatal error: Unable to find local gruntI thought Yeoman would automate any grunt process. Is there something that I’m doing wrong? I
sameer
javascript angularjs maven yeoman
I have recently integrated maven yeoman plugin with my app. I followed https://github.com/trecloux/yeoman-maven-plugin/blob/master/TUTORIAL.md My angular version is v1.2.3 . When I run the mvn clean install command, I get the following error . [email protected] node_modules\grunt-contrib-imagemin ?ö£?öÇ?öÇ [email protected] ?ö£?öÇ?öÇ [email protected] ([email protected], [email protected]) ?ö£?öÇ?öÇ [email protected] ([email protected]) ?ö£?öÇ?öÇ [email protected] ([email protected]) ?ö£?öÇ?öÇ p
ntron
android angularjs
i have a problem with my hyprid angular. if i run the app on my android phone logcat say injection errors.Thats my index.html<!doctype html> <!–[if lt IE 7]> <html class=”no-js lt-ie9 lt-ie8 lt-ie7″> <![endif]–> <!–[if IE 7]> <html class=”no-js lt-ie9 lt-ie8″> <![endif]–> <!–[if IE 8]> <html class=”no-js lt-ie9″> <![endif]–> <!–[if gt IE 8]><!–> <html class=”no-js”> <!–<![endif]–>
ghiscoding
angularjs angularjs-directive
So basically I’m building myself a new directive for form validation and I got it all working perfectly except for 1 thing which I believe is not properly coded. So as you know form validation with a directive is to validate an <input ngx-validation=”alpha”> how do I pass the error text, which occurs inside my directive to the other element (a Bootstrap <span class=”text-danger”>{{ validation_errors[“input1”] }}</span> that is right below my input? As for the moment, I created
Connor Leech
javascript angularjs angularjs-controller mean-stack
This is a long shot, but has anyone seen this error before? I am trying to add ‘Transporters’ using express, angular and mongoDB. I get this error whenever I access a page ruled by the transporters controller:Error: [ng:areq] http://errors.angularjs.org/1.2.12/ng/areq?p0=TransportersController&p1=not%20aNaNunction%2C%20got%20undefinedat Error (native)at http://localhost:3000/lib/angular/angular.min.js:6:450at tb (http://localhost:3000/lib/angular/angular.min.js:18:360)at Pa (http://localhost
tinyBIGideas
javascript performance angularjs
I’ve been battling with a large data array of varied length roughly between 100 ~ 200 items, but can be greater.The data items themselves come from a custom reporting algorithm that produces the array of objects.Object example:ts:budget: “foo” ts:category: “foo” ts:client: “foo” ts:entryTime: 14.5 ts:project: “foo (00000000)” ts:task: “foo” ts:user: “foo” ts:userGroup: “foo”Multiply that object example by 100 ~ 200 and that’s what I’m working with. Nothing massive, so I wasn’t expecting such a l
Yahya KACEM
javascript angularjs
this code is from the AngularJs docs for ngRouterangular.module(‘ngViewExample’, [‘ngRoute’, ‘ngAnimate’],function($routeProvider, $locationProvider) {$routeProvider.when(‘/Book/:bookId’, {templateUrl: ‘book.html’,controller: BookCntl,controllerAs: ‘book’});$routeProvider.when(‘/Book/:bookId/ch/:chapterId’, {templateUrl: ‘chapter.html’,controller: ChapterCntl,controllerAs: ‘chapter’});// configure html5 to get links working on jsfiddle$locationProvider.html5Mode(true); });function MainCntl($rout
sksallaj
angularjs breeze angularjs-select2
I have a project where I’m using BreezeJS to fetch data from my webserver. I’m using AngularJS with the ui-select2 module. Currently, I have it where when I load my page, breezejs makes a call to fetch the data that I dump into a scope variable. From there, select2 can easily make the reference to it and build accordingly.If I want to ajaxify things, it gets really tricky. I want to have the ability to use select2’s ajax or query support, but instead of using it to fetch data, I want to use bree
Blaiz
angularjs unit-testing
I’m using AngularJS and trying to test a controller that calls a factory to get some data.This is the controller code:’use strict’angular.module(‘AngularApp’).controller ‘IndexCtrl’, ($scope, session, navigation) ->session.find().then (response) ->$scope.session = response.data$scope.someOtherVariable = {}Naturally, I’d like to swap the factory with a mock to prevent calling a real API. I’m trying to use $provide.factory to inject the mock copy:’use strict’describe ‘Controller: IndexCtrl’,
Mark Simpson
angularjs
I get a module error in my app, but it fixes itself upon page refresh.Is it safe to assume (since a reload fixes the issue) that my code isn’t buggy, and there is something else causing the problem?What could possibly be the cause of the module error?EDIT: I am using AngularJS v1.2.0-rc.2 in the form of a single file (angular.min.js) containing angular.min, angular-route.min, angular-resource.min, and angular-sanitize.min.Here’s the complete error:Failed to instantiate module quoteApp due to: E
Tom Maton
angularjs firebase angularfire
I’m trying to add data to existing data within Firebase using AngularFire my data currently looks like this, very simple list of clients:clients–Firebase UID—-client: Client1–Firebase UID—-client: Client2–Firebase UID—-client: Client3But I want to be able to add under the client sections such as team with a list of team members and some of their details. eg–Firebase UID—-client: Client1——team: {Bob: {email: address, position: developer}, Peter: {email: address, position: develope
Great Question
java android listview firebase
My goal is just to retrieve data from Firebase and then output it as ListView in Android (No need to push anything back to the database). I tried to learn from the AndroidChat example and created my own class and my own Custom List Adapter class instead of Chat.java and ChatListAdapter.java (as in the orignal example). I also changed the references to my Firebase and resemble my data structure to that of https://android-chat.firebaseio-demo.com/. Below is my data structure: (Everything below is
Great Question
java android firebase
This question is also trying to find out the answer for this question that I posted several days ago.The weird thing about the AndroidChat app is when I changed the Chat class properties name to different name. It result in a “Failed to bounce to type” exception. Same thing happened when I changed the name (from author to author2) in my firebase instance. Below are screenshots describing what I’m trying to say. Also there is a LogCat at the end:When changing from author to author2 in Chat.java:O
Marco W.
java firebase
I’m using Firebase in Java. The following simple code has always worked fine when users’ information had to be updated:final FirebaseBean_User userObject = new FirebaseBean_User(uuid, name, timestamp, points, gamesPlayed, gamesWon); mFirebaseUser.setValue(userObject, System.currentTimeMillis());I used the current timestamp as the priority value so that I can get a list of all users that have been online recently.However, when users go offline, I would like to mark them as offline. Thus, I added
cilphex
firebase
Or will it cause an error?Example:authClient = new FirebaseAuthClient(baseRef, function(error, user) { … });// Try to log in… authClient.login(‘password’, {email: ‘some_email’, password: ‘some_password’});// Before the callback from the previous line of code executes… // Oh wait, I forgot to signup in the first place, let me do that: authClient.createUser(‘some_email’, ‘some_password’, function(error, user) { … });
Baz
node.js firebase
I am running a transaction to update an item that needs to be stored in two keys. To accomplish this, I have setup a nested transaction as follows, and it seems to run as expected:firebaseOOO.child(‘relationships/main’).child(accountID).child(friendAccountID).transaction(function(data) {data.prop = ‘newval’;firebaseOOO.child(‘relationships/main’).child(friendAccountID).child(accountID).transaction(function(data) {return r;});return r; });Are there any gotchas or possible unexpected implications
MassStrike
java android dynamic android-view firebase
I have and Android app which adds TableViews, TableRows and TextViews dynamically at run time according to data found in a Firebase repository. More specifically, a TableView is added for each “Poll” found in the repo to the static LinearLayout, for each “Election” found in the Poll a TableRow is added to that Tablelayout, and for each “Nominee” in the Election a TableRow containing two TextViews for data is added to the TableLayout as well. So potentially I could have multiple tables added at r
MasterScrat
android firebase
What is the minimum Android SDK version to use Firebase on Android?I see that the AndroidDrawing example works with API Level 17, but not 11. What exactly is the limit?To be more precise: it doesn’t crash, but the application never receives any data. So for the AndroidDrawing example I am basically drawing on my own.edit: Platform version 4.0 (API Level 14) doesn’t work either.
connor
ios objective-c exc-bad-access firebase
I’m getting a EXC_BAD_ACCESS whenever I try to call a method on one of my Firebase objects. Here is the line it is currently crashing on:NSLog(@”%@”,[self.ref description]);I’ve made sure self.ref is not nil. Any help is appreciated. Thanks!Edit: here is its property declaration: @property (strong, nonatomic)Firebase* ref;
James Dinsdale
javascript variables global-variables firebase
I’m trying to set up user authentication with Firebase and Twitter. The code from this answer works to a point:var url = ‘https://molovo-comments.firebaseio.com/’; var myDataRef = new Firebase(url);var dataStore = (function(){var user = null;var auth = new FirebaseSimpleLogin(myDataRef, function(error, data) {if (error) {// an error occurred while attempting loginconsole.log(error);} else if (user) {// user authenticated with Firebaseuser = data; console.log(‘User ID: ‘ + user.id + ‘, P
Tom Maton
angularjs firebase angularfire
I’m trying to add data to existing data within Firebase using AngularFire my data currently looks like this, very simple list of clients:clients–Firebase UID—-client: Client1–Firebase UID—-client: Client2–Firebase UID—-client: Client3But I want to be able to add under the client sections such as team with a list of team members and some of their details. eg–Firebase UID—-client: Client1——team: {Bob: {email: address, position: developer}, Peter: {email: address, position: develope
D. Hayes
javascript angularjs firebase angularfire
I’m using AngularFire in a multiplayer game and it sure looks like AngularFire is deleting my objects after the first load of a controller.I’m using browserify to concatenate my JS files together so all my modules look like CommonJS modules.My controllers are all loaded via ngViews and defined routes. I’m trying to keep knowledge of what user objects in Firebase look like confined to a user service; hence, all AngularFire invocations for the user object live in the service.Here’s my HomeControll
Marc A. Champlain
angularjs firebase trigger.io angularfire
I have built a really basic CRUD application with AngularJS and Firebase, I’m running it on Android using Trigger.ioI log the content of the FirebaseCollection, but if I put the phone in Airplane mode, I get the following error and the application crash:D/AndroidRuntime(19714): Shutting down VM W/dalvikvm(19714): threadid=1: thread exiting with uncaught exception (group=0x4153e700) E/AndroidRuntime(19714): FATAL EXCEPTION: main E/AndroidRuntime(19714): java.lang.NullPointerException E/AndroidRun
Sandeep Reddy
firebase angularfire
//controller code.var fireurl = ‘https://someuerid.firebaseio.com/’ var usersref = new Firebase(fireurl); angularFire(usersref.limit(10), $scope, “userConcalls”);//view code<li ng-repeat=”(key, value) in userConcalls”>key:{{key}} value: {{value}} </li>Error Uncaught Error: Firebase.child failed: First argument was an invalid path: “.priority”. Paths must be non-empty strings and can’t contain “.”, “#”, “$”, “[“, or “]”
bennewton999
javascript angularjs internet-explorer-8 firebase angularfire
I have an app that is using angular and firebase. It makes a call to my firebase url and does a simple ng-repeat of the 2 items in the object returned.The app works great in every browser except Internet Explorer 8. I tested it in IE 8 often and it was working. Not that I have launched it, sometime in the last few days it began receiving this error. I have made changes in the app over this time, but nothing in my mind that would change the way IE8 would render it.The error in IE8 is simply:SC
Jared Tomaszewski
javascript angularjs firebase angularfire angular-ui-router
I want to dynamically build a template with data from database (Firebase/angularFire in my case). The way the template will be built depends on the tag property within each object retrieved with angularFire. My first approach:var imgTemplate = function(tag){return ‘<‘+tag.tag+’ class=”{{ tag.classes }}” src=”{{ tag.content }}” alt=”{{ tag.alt }}”>’; }; var txtTemplate = function(tag){return ‘<‘+tag.tag+’ class=”{{ tag.classes }}”>{{ tag.content }}</’+tag.tag+’>’; };This almost
o_tiger
angularjs firebase angularfire
I am looking for a solid way to have the ‘current user id’ in all my controllers available. Using: Firebase Simple Login : Email / Password AuthenticationMy ida: I need a ‘Factory’ wich I can inject into my controllers, to have the ‘current user id’ always available. I came up with this code:app.factory(‘User’, [‘angularFire’,//Get Current UserIDfunction(angularFire){console.log (‘FACTORY: User’);var currentUser = {};var ReturnStr = ”;var ref = new Firebase(“https://myFIREBASE.firebaseio.com/
Swordfish0321
angularjs controller firebase angularfire
I’m using ng-submit on a form to push data to a Firebase, everything works as expected. What I would like to do is change views at the same time. On the submit button itself I have ng-click set to execute a function using $location. If I place my changeView function in a .controller method I can’t utilize $location (specifically, it says – “Error: ‘undefined’ is not an object (evaluating ‘$location.path’)”). Any help would be super duper.// This doesn’t work and throws the error myApp.controller
o_tiger
firebase angularfire
How can I read a (Firebase & FirebaseIndex) object?My Ctrl looks like:var url = ‘https://MYFIREBASE.firebaseio.com/’; var toDoRef = new Firebase(url); var index = ‘podio_covers/’+ $routeParams.label_id +’/limesurveys/’; var master = ‘podio_surveys’;var surveys = new FirebaseIndex(toDoRef.child(index), toDoRef.child(master)) $scope.surveys = angularFireCollection(surveys);console.log ($scope.surveys) looks like:[add: function, remove: function, update: function] 0: angularFireItem$id: “85524
Jared Tomaszewski
javascript angularjs firebase angularfire
I am trying to reorder (swap) children by their numerical priority. Here’s my attempt:var swapChildrenByPriority = function(url, child1Priority, child2Priority){var ref = new Firebase(url);var child1, child2;ref.on(‘value’, function(snap){snap.forEach(function(child){if(child.getPriority() === child1Priority){child1 = child;};if(child.getPriority() === child2Priority){child2 = child;};});});ref.child(child1.name()).setPriority(child2.getPriority());ref.child(child2.name()).setPriority(child1.get
Web site is in building