marcoslin / angularAMD

Facilitate use of RequireJS in AngularJS
http://marcoslin.github.io/angularAMD
MIT License
734 stars 171 forks source link

Hi, I'm trying to implement Authentication using this example, but don't know how: #92

Closed hawkwind2 closed 10 years ago

hawkwind2 commented 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

marcoslin commented 10 years ago

Is this an error? Doesn't seem related to angularAMD. Please clarify or delete it.