I don't want to load all of my controllers. I have found some articles about loading a controller dynamically but haven't succeeded. I tried:
var premaApp = angular.module('premaApp', ['ngRoute']);
premaApp.config(function ($routeProvider) {
$routeProvider
.when('/',
{
templateUrl: '/Home/Test',
controller: 'personController',
resolve: '/app/controllers/product.controller.js'
});
});
But I got an error. What is the right way to do this?