File

app/dxa/dxa-entity/views/my-profile-views/my-profile-confirmation/my-profile-confirmation.component.ts

Implements

OnInit

Metadata

selector my-profile-confirmation
styleUrls ./my-profile-confirmation.component.scss
templateUrl ./my-profile-confirmation.component.html

Index

Properties
Methods
Inputs

Constructor

constructor(labelService: LabelService, pubService: PublicationService, router: Router)
Parameters :
Name Type Optional
labelService LabelService No
pubService PublicationService No
router Router No

Inputs

user
Type : any

Methods

ngOnInit
ngOnInit()
Returns : void
sendToHomePage
sendToHomePage()
Returns : void

Properties

continueToSkfLabel
Type : string
descriptionLabel
Type : string
titleLabel
Type : string
welcomeLabel
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> 

./my-profile-confirmation.component.scss

@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
Component
Html element with directive

result-matching ""

    No results matching ""