Load Angular’s controllers from projects in solution

问题内容:

I am new to the Angular world.
I have Asp.Net MVC project and use Angular for frontend.
Now I want to separate Angular’s controllers to another Class Library in my solution.
But I don’t know how I can load this controllers.
For example, now I load controllers:

$routeProvider
 .when('/customers',
    {
        controller: 'CustomersController',
        templateUrl: '/app/views/customers.html'
    })
.when('/customerorders/:customerID',
    {
        controller: 'CustomerOrdersController',
        templateUrl: '/app/views/customerOrders.html'
    })
.when('/orders',
    {
        controller: 'OrdersController',
        templateUrl: '/app/views/orders.html'
    })
.otherwise({ redirectTo: '/customers' });

If I’ll move this controllers to other project, how can I load this?

问题评论:

    

原文地址:

https://stackoverflow.com/questions/47752884/load-angulars-controllers-from-projects-in-solution

添加评论