This directive is designed to provide a general purpose login view.
Desgined to be as simple as possible in order to afford intuitive interactions.
Converted into an angular directive for your convenience :)
Click here for a live demo.
- Install 'angular-login-view' with bower
bower install angular-login-view
- Add 'g1b.login-view' module to your app config
angular.module('myApp', [
'g1b.login-view',
......
])
- Use directive in your view
<login-view user="me" on-login="print(me)"></login-view>
Property | Usage | Default | Required |
---|---|---|---|
user | JSON object representing a user with username and password | none | no |
position | Position of login view (choices are 'top', 'bottom', 'left' and 'right) | bottom | no |
placeholder | String displayed in the button that triggers login-view | Log In | no |
on-login | Handler function that is fired on submit of login form | none | no |
on-close | Handler function that is fired on close/hide of login form | none | no |