Why my AngularJS module isn't defined -
here code:
var app = angular.module('todoapp', ['ui.router', 'ngresource', 'ui.bootstrap']); app.config(['$stateprovider', '$urlrouterprovider', function($stateprovider, $urlrouterprovider) { $urlrouterprovider.otherwise("/"); $stateprovider .state('home', { url: "/", templateurl: '/templates/index.html', }) .state('signup', { url: "/signup", templateurl: '', }) } ]); module.exports = app;
when i'm running in in browser, show me error: referenceerror: module not defined
what i'm doing wrong ? how define module ?
the console error message few lines below module not defined
gives hint problem is:
module 'ui.router' not available! either misspelled module name or forgot load it.
check if have included file containing ui.router
page (i.e. html template) angular can load it.
Comments
Post a Comment