Skip to content

have to error when i create 3 controller #2

Description

@ttson24

hi you.
when i create 3 controller is

angular.module('app.core', [])
    .controller('WhatsOnController', function($scope) {
        var vm = this;
        vm.title="This is title of what's on page";
    });

and

angular.module('app.core', [])
    .controller('MyShowsController', function($scope) {
        var vm = this;
        vm.title="This is title of my show page";
    });

and

angular.module('app.core', [])
    .controller('SearchController', function($scope) {
        var vm = this;

    });

i have route.js

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions