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

不打扰是莪最后的温柔 提交于 2019-12-05 23:30:12

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/22058334/how-to-enable-route-security-when-using-angularfire-with-angular-ui-router

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!