I want to limit access to view by button only. I mean I want to let user access the view only when he clicked the button (can't access if he just pasted url to view in address bar). And not by ng-show with would just not show the view but by blocking it from loading.
Possible scenarios:
Is there a way to do it? I'm using ui-router btw.
If you're using ui-router, you can use the state without url. So, when user clicks the button 'Add user button' - you can just change the state, but not the url. In this case, nobody can access 'Add user' view by url.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.