projects/Hello02/src/app/modules/detail02/home/home.component.ts
selector | app-home |
styleUrls | ./home.component.scss |
templateUrl | ./home.component.html |
Properties |
|
Accessors |
constructor(messsageSevice: MessageService)
|
||||||
Parameters :
|
Public messsageSevice |
Type : MessageService
|
msg |
getmsg()
|
import { Component, OnInit } from '@angular/core';
import { MessageService } from 'projects/common-service/src/public-api';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class Detail02HomeComponent {
constructor(public messsageSevice: MessageService) { }
get msg() {
return this.messsageSevice.getHello();
}
}
<lib-title message="Message02: {{msg | async}}" (click)="messsageSevice.addCounterValue()"></lib-title>
./home.component.scss