http://stackoverflow.com/questions/21918539/angularjs-using-an-interceptor-to-handle-http-404s-promise-not-defined-error
On Mon, Nov 10, 2014 at 10:36 AM, voltron <[email protected]> wrote: > I have got the ngRoute module to work somewhat, I am serving my Angular > app using Node Express 4, I have only one route configured, and thats "/" > > angular.module('app', ['mm.foundation', 'ngRoute']) > .config(['$routeProvider', '$locationProvider', > function($routeProvider, $locationProvider) { > $locationProvider.html5Mode(true); > $routeProvider. > when('/foo', { > templateUrl: 'assets/js/foo.html', > controller: 'FooController' > }). > otherwise({ > redirectTo: '/' > }); > } > ]); > > If I type in a non-existing route, Express still handles the rout and > sends status 404 to the client, Why is this the case? I have stated > "otherwise" in my test controller, I would expect my angular app to handle > this and send the user back to root. > > Any deas what I am doing wrong? Thanks > > -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
