Is it possible to use theAngularFire routeSecurity module with angular UI-ROUTER instead of the standard ng-route provider? Is there a version of routeSecurity that would work with ui-router?
Asked
Active
Viewed 1,436 times
7
-
The angularFire-seed routeSecurity mod is written for ngRoute, and therefore won't work with ui-router. Nobody has written a module to integrate with ui-router yet, although that shouldn't prove particularly challenging. – Kato Mar 06 '14 at 15:12
1 Answers
8
@mattvv Gave me this gist while I was talking on him in the angular irc channel. So essentially you would just need to replace the routesecurity.js
file in angularfire directory assuming that you used yeoman to scaffold your application.
A neat thing to do is just to create another file named routesecurity-ui-router.js
instead of replacing the content of the routesecurity.js
.
So to give a little bit of information about the gist, basically mattvv just modified the routes
term and use state
instead.

Joey Hipolito
- 3,108
- 11
- 44
- 83
-
1+1 and thanks, those are helpful tips. I will look into the routesecurity.js file. – Jarnal Mar 07 '14 at 20:24
-
that is not just a tip, haha, it works!, I've came across that problem too, 7 days ago, just after you asked the question. – Joey Hipolito Mar 07 '14 at 20:34
-
I agree its more than just a tip, :) I had somehow missed the link to the gist on the initial look. Marking this as answer. Thanks. – Jarnal Apr 03 '14 at 22:04