3

I was wondering if it's possible to have AngularJS ignore a set of route values, or define a set of route values that should be sent to the server and not handled on the client?

I ask because I'm trying to setup my different login providers, which are handled by the server (node.js) by navigating to /auth/{provider}. If I navigate there, AngularJS tries to jump in and handle that route, but I'd like the server to handle it.

I do know I can make my a tags target "_self" (target="_self") but I'd actually like to handle the redirection from CoffeeScript using $location.url.

EDIT: It also seems I can get around angular by using window.location.pathname. I still don't like this solution. Anyway I can do this using $location provided by AngularJS (or using anything provided by Angular?).

Is this possible? Many thanks in advance!!

Jason L.
  • 2,464
  • 1
  • 23
  • 41
  • I personally do not understand what the problem is. If you have a URL that responds with a markup that does not have any references to angularjs then how would angularjs "jump in"? – akonsu Nov 30 '12 at 20:16
  • I haven't dug through the source code to figure out either, but if you have an anchor with the url of, say, "/test" and don't supply target="_self" the url will change but nothing will happen (it won't contact the server, even if Express is setup to respond to that url). Likewise, if I set $location.url('/test') nothing will happen. – Jason L. Nov 30 '12 at 20:41
  • possible duplicate of http://stackoverflow.com/questions/13023338/conditionally-have-anchor-links-send-user-to-a-different-page-rather-than-load – akonsu Nov 30 '12 at 21:50
  • possible duplicate of [Telling Angular Js to ignore a specific route](http://stackoverflow.com/questions/17407024/telling-angular-js-to-ignore-a-specific-route) – Paul Sweatte Dec 02 '14 at 19:44

0 Answers0