Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable route security when using AngularFire with Angular ui-router?

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?

like image 238
Jarnal Avatar asked Feb 27 '14 03:02

Jarnal


1 Answers

@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.

like image 64
Joey Hipolito Avatar answered Nov 15 '22 09:11

Joey Hipolito