You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
angular.module('app.routes',['ngRoute']).config(routes);
function routes($routeProvider){
$routeProvider
.when('/',{
templateUrl:'sections/whats-on/whats-on.tpl.html',
controller:'WhatsOnController as whatsOn'
})
.when('/my-shows',{
templateUrl:'sections/my-shows/my-shows.tpl.html',
controller:'MyShowsController as myShows'
})
.when('/search',{
templateUrl:'sections/search/search.tpl.html',
controller:'SearchController as search'
})
.otherwise({
redirectTo:'/'
})
}
the first controlller run: ok but second and 3th have to error: Argument 'MyShowsController' is not a
what is should i do?
Incase anybody stumbles upon this old thread. In the above example the app.core module is being created three times with angular.module('app.core', []). To add a controller to a module without creating it, simply remove the [], so angular.module('app.core').controller('MyShowsController') would do it.
I am having error like while start the server :Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found.
Activity
jerry84 commentedon May 16, 2016
Looks correct, did you add all your controllers in index.html?
RevillWeb commentedon Mar 21, 2017
Incase anybody stumbles upon this old thread. In the above example the app.core module is being created three times with
angular.module('app.core', []). To add a controller to a module without creating it, simply remove the[], soangular.module('app.core').controller('MyShowsController')would do it.ravik1086 commentedon May 7, 2018
I am having error like while start the server :Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found.
ravik1086 commentedon May 7, 2018
can you please explain and how can I correct it????? @RevillWeb
pankajparkar commentedon Nov 12, 2019
@ravik1086 It seems like you're using Angular not AngularJS