File
Implements
Metadata
selector |
my-profile-confirmation |
styleUrls |
./my-profile-confirmation.component.scss |
templateUrl |
./my-profile-confirmation.component.html |
Index
Properties
|
|
Methods
|
|
Inputs
|
|
Methods
sendToHomePage
|
sendToHomePage()
|
|
|
continueToSkfLabel
|
Type : string
|
|
descriptionLabel
|
Type : string
|
|
import { Component, OnInit, Input } from '@angular/core';
import { LabelService } from 'src/app/core/services/label-service/label-service.service';
import { PublicationService } from 'src/app/core/services/publication-service/publication.service';
import { Router } from '@angular/router';
@Component({
selector: 'my-profile-confirmation',
templateUrl: './my-profile-confirmation.component.html',
styleUrls: ['./my-profile-confirmation.component.scss']
})
export class MyProfileConfirmationComponent implements OnInit {
titleLabel: string;
welcomeLabel: string;
descriptionLabel: string;
continueToSkfLabel: string;
@Input() user: any;
constructor(
private labelService: LabelService,
private pubService: PublicationService,
private router: Router) { }
ngOnInit() {
this.labelService.getLabel('confirmationTitle').then(label => this.titleLabel = label);
this.labelService.getLabel('welcome').then(label => this.welcomeLabel = label);
this.labelService.getLabel('confirmationDescription').then(label => this.descriptionLabel = label);
this.labelService.getLabel('continueToSkf').then(label => this.continueToSkfLabel = label);
}
sendToHomePage(){
this.router.navigateByUrl(this.pubService.getPublicationPath())
}
}
<div id='container'>
<h2>{{titleLabel}}</h2>
<p>{{welcomeLabel}} {{user.given_name}} {{user.family_name}}</p>
<p>{{descriptionLabel}}</p>
<button class="btn btn-green" (click)='sendToHomePage()'>{{continueToSkfLabel}}</button>
</div>
@import "src/app/styles/helpers";
#container {
padding-left: calc-rem(35);
padding-bottom: calc-rem(15);
padding-top: calc-rem(15);
}
h2 + p {
font-weight: bold;
}
Legend
Html element with directive