import {Component, ElementRef, NgZone, OnInit, ViewChild} from "@angular/core"; import {Router} from "@angular/router"; import {##SERVICE##} from "../../shared/##NAME##/##NAME##.service"; @Component({ selector: "gen-comp-##NAME##", templateUrl: "pages/##NAME##/##NAME##.html", styleUrls: ["pages/##NAME##/##NAME##-common.css", "pages/##NAME##/##NAME##.css"], }) export class ##COMPONENT## implements OnInit { dataList = []; listLoaded = false; constructor(private _listService: ##SERVICE##, private router: Router) {} ngOnInit() { this.dataList = this._listService.load(); this.listLoaded = true; } showDetails(event) { this.router.navigate(['/##NAME##', event]); } }