Protected function that requires authentication


#1

I have a public listing page, with a “like” button.

If clicking the “like” button without logged in, I want to pop-up a ng-modal login page for user to login (or registration) before running the rest of the “like” function.

Is there any example in codepen that I can refer to?

Thanks in advance!

Richard


#2

Found this which is very useful: http://brewhouse.io/blog/2014/12/09/authentication-made-simple-in-single-page-angularjs-applications.html