Files
cbsnexora/src/app/home/home.component.ts
T
Abhay ChawlaandGitHub 598f239251 refractor: home module (#297)
* Refractor components.
* Redesign home component.
* Add comments.

Fixes #296
2018-08-12 20:46:54 +05:30

34 lines
807 B
TypeScript

/** Angular Imports */
import { Component, OnInit } from '@angular/core';
/** Custom Services */
import { AuthenticationService } from '../core/authentication/authentication.service';
/**
* Home component.
*/
@Component({
selector: 'mifosx-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
/** Username of authenticated user. */
username: string;
/**
* @param {AuthenticationService} authenticationService Authentication Service.
*/
constructor(private authenticationService: AuthenticationService) { }
/**
* Sets the username of the authenticated user.
*/
ngOnInit() {
const credentials = this.authenticationService.getCredentials();
this.username = credentials.username;
}
}