Thinkster.io Angularjs Tutorial Chapter 3 - Problems Connecting To Firebase
Solution 1:
I had the same problem doing the tutorial, and It's because you didn't do that it step says:
"If you look at your grunt terminal, you can see that there's a task called jshint that is run every time you change a javascript file. This checks your javascript for any syntax errors and gives you hints for fixing them. Ideally we want to have no errors in our application. In .jshintrc, we can add "app": false to tell jshint about app so we can use it in all of our files without any warnings, and / global app:true / at the top of app.js to let jshint know that app is defined in that file."
Like app is not a global variable, you need to add it, So you Jshintrc File looks like:
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"globals": {
"angular": false,
"app":false <---- Add this line
}
}
And App.Js:
'use strict';
/* global app:true */ <---- Add this line
/**
* @ngdoc overview
* @name angNewsApp
* @description
* # angNewsApp
*
* Main module of the application.
*
*/varapp= angular.module('angNewsApp', [
'ngCookies',
'ngResource',
'ngRoute',
'ngSanitize'
])....
Also Add the <script src="scripts/services/post.js"></script>
in the page.
I think you problem is that.
Post a Comment for "Thinkster.io Angularjs Tutorial Chapter 3 - Problems Connecting To Firebase"