How to redirect in AngularJS without rendering template
I'm trying to redirect to an external page from my AngularJS file if the
user enter a special url, for instance /test. I have gotten this to work
in multiple different ways but all the different ways show a "flash" of
the design from index.html. I would like it to go direct without rendering
any html at all!
Here is a fiddle of one of the examples, but it is not the best place to
test since I cant redirect from jsiffle.net :-)
$routeProvider.when("/test", {
resolve: {
controller: "Redirect"
}
});
Also had one example where I just used a controller and a empty template
in the routing, but it gave me the same result.
Any ideas?
No comments:
Post a Comment