Angular Guards implemented with API
Login System for AngularJS
Example
We have to login a user with two types of role
Methods
atob(): Based on mozilla:
The
atob()method of theWindowinterface decodes a string of data which has been encoded using Base64 encoding. You can use theWindow.btoa()method to encode and transmit data which may otherwise cause communication problems, then transmit it and use theatob()method to decode the data again. For example, you can encode, transmit, and decode control characters such as ASCII values 0 through 31.