### File

`src/app/login/login.component.ts`

### Implements

`OnInit`

### Metadata

selector | `app-login`
styleUrls | `login.component.scss`
templateUrl | `./login.component.html`

### Index

###### Properties
Public router
###### Methods
ngOnInit onLoggedin

### Constructor

`constructor(router: Router)`
Defined in src/app/login/login.component.ts:11
Parameters :
Name | Type | Optional | Description
router | `Router` |  |

### Methods

ngOnInit
`ngOnInit()`
Defined in src/app/login/login.component.ts:16
Returns : `void`

onLoggedin
`onLoggedin()`
Defined in src/app/login/login.component.ts:19
Returns : `void`

### Properties

Public router
`router: `Router``
Type : `Router`
Defined in src/app/login/login.component.ts:13

    import { Component, OnInit } from '@angular/core';
    import { Router } from '@angular/router';
    import { routerTransition } from '../router.animations';

    @Component({
        selector: 'app-login',
        templateUrl: './login.component.html',
        styleUrls: ['./login.component.scss'],
        animations: [routerTransition()]
    })
    export class LoginComponent implements OnInit {

        constructor(public router: Router) {
        }

        ngOnInit() {
        }

        onLoggedin() {
            localStorage.setItem('isLoggedin', 'true');
        }

    }

    <div class="login-page" [@routerTransition]>
        <div class="row">
            <div class="col-md-4 push-md-4">
                <img src="assets/images/logo.png" width="150px" class="user-avatar" />
                <h1>Vocabulary in Reading</h1>
                <form role="form">
                    <div class="form-content">
                        <div class="form-group">
                            <input type="text" ng-model="name" class="form-control input-underline input-lg" id="" placeholder="Email">
                        </div>

                        <div class="form-group">
                            <input type="password" class="form-control input-underline input-lg" id="" placeholder="Password">
                        </div>
                    </div>
                    <a class="btn rounded-btn" [routerLink]="['/dashboard']" (click)="onLoggedin()"> Log in </a>
                    &nbsp;
                </form>
            </div>
        </div>
    </div>

Legend
Html element
Component
Html element with directive

# results matching ""

# No results matching ""