FAvIo41 FAvIo41 - 1 year ago 131
AngularJS Question

AngularJs ReferenceError: angular is not defined

I trying to add a custom filter, but if I use the following code:

angular.module('myApp',[]).filter('startFrom', function() {
return function(input, start) {
start = +start; //parse to int
return input.slice(start);

But if I do so, I get: "ReferenceError: angular is not defined" in firebug.

The rest of application is working fine, I am using ng-app in a tag div not in tag html, and https://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.js

Answer Source

Well in the way this is a single page application, the solution used was:

load the content with AJAX, like any other controller, and then call:



Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download