Closed hawkwind2 closed 10 years ago
var AwesomeAngularMVCApp = angular.module('AwesomeAngularMVCApp', ['ngRoute']);
AwesomeAngularMVCApp.controller('LandingPageController', LandingPageController); AwesomeAngularMVCApp.controller('LoginController', LoginController);
AwesomeAngularMVCApp.factory('AuthHttpResponseInterceptor', AuthHttpResponseInterceptor);
var configFunction = function ($routeProvider, $httpProvider) { $routeProvider. when('/routeOne', { templateUrl: 'routesDemo/one' }) .when('/routeTwo/:donuts', { templateUrl: function (params) { return '/routesDemo/two?donuts=' + params.donuts; } }) .when('/routeThree', { templateUrl: 'routesDemo/three' }) .when('/login', { templateUrl: '/Account/Login', controller: LoginController });
$httpProvider.interceptors.push('AuthHttpResponseInterceptor');
} configFunction.$inject = ['$routeProvider', '$httpProvider'];
AwesomeAngularMVCApp.config(configFunction);
Source example: http://www.codeproject.com/Articles/806029/Getting-started-with-AngularJS-and-ASP-NET-MVC-Par
Kind regards
Is this an error? Doesn't seem related to angularAMD. Please clarify or delete it.
var AwesomeAngularMVCApp = angular.module('AwesomeAngularMVCApp', ['ngRoute']);
AwesomeAngularMVCApp.controller('LandingPageController', LandingPageController); AwesomeAngularMVCApp.controller('LoginController', LoginController);
AwesomeAngularMVCApp.factory('AuthHttpResponseInterceptor', AuthHttpResponseInterceptor);
var configFunction = function ($routeProvider, $httpProvider) { $routeProvider. when('/routeOne', { templateUrl: 'routesDemo/one' }) .when('/routeTwo/:donuts', { templateUrl: function (params) { return '/routesDemo/two?donuts=' + params.donuts; } }) .when('/routeThree', { templateUrl: 'routesDemo/three' }) .when('/login', { templateUrl: '/Account/Login', controller: LoginController });
} configFunction.$inject = ['$routeProvider', '$httpProvider'];
AwesomeAngularMVCApp.config(configFunction);
Source example: http://www.codeproject.com/Articles/806029/Getting-started-with-AngularJS-and-ASP-NET-MVC-Par
Kind regards