File

src/app/com/mycompany/normalize/component/page/home/home.component.ts

Extends

PlBaseComponent

Implements

OnInit

Example

Metadata

providers HomeService
selector app-home
styleUrls ./home.component.css
templateUrl ./home.component.html

Index

Methods

Constructor

constructor(injector: Injector)
Parameters :
Name Type Optional
injector Injector No

Methods

ngOnInit
ngOnInit()
Returns : void
import { Component, OnInit ,Injector} from '@angular/core';
import { HomeService } from './home.service';
import { PlBaseComponent } from 'pl-core-utils-library';
/**
 * @author l.piciollo
 * componente pagina home template.. qui viene la creazione del servizio del modulo HomeService.. questo garantisce che 
 * il servizio poi viene killato al momento dell' onDestroy del modulo.
 * attenzione, ci deve essere solo una istanza del componente home, altrimenti il servizio viene ricreato. in caso di necessita
 * di piu componenti home, eliminare la riga  providers:[HomeService] .
 */
@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css'],
  providers:[HomeService]
})
export class HomeComponent  extends PlBaseComponent implements OnInit {

  constructor( protected injector: Injector  ) {
    super(injector)
  }

  ngOnInit() {
  }

}
<p>
  home works!
</p>

./home.component.css

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""