Trying to write first angular app using node.js, express, and jade. So I know it must be something very simple but I have been stuck for a while.
I included angular js ( route using the CDN in the head section of the jade(html) template. As indicated bellow:
link(href='https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.js')
link(href='https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular-route.js')
I also tried switching from the angular.js in the CDN to a plain include in my own server, without any positive results to my problem. I use the directive ng-app='myApp' in the html tag of the template (also tried in the body tag after the head includes). I also include myApp in the head section of the jade (or html) template using:
script(src='/webapp/js/myApp.js')
The code in myApp.js looks like this:
var myApp=angular.module('myApp', [
'ngRoute'
]).config(['$routeProvider', function($routeProvider) {
...
}]);
I keep getting the console error:
ReferenceError: Can't find variable: angular
globalcode - myApp.js:2