import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }%><% if(changeDetection !== 'Default') { %>, ChangeDetectionStrategy<% }%> } from '@angular/core'; import { NzModalSubject } from 'ng-zorro-antd'; import { _HttpClient } from '@delon/theme'; @Component({ selector: '<%= selector %>',<% if(inlineTemplate) { %> template: `<% if(modal) { %> 10000 <% } else { %> 10000 10000 <% } %> `,<% } else { %> templateUrl: './<%= dasherize(name) %>.component.html',<% } if(inlineStyle) { %><% } else { %> styleUrls: ['./<%= dasherize(name) %>.component.<%= styleext %>']<% } %><% if(!!viewEncapsulation) { %>, encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>, changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %> }) export class <%= classify(name) %>Component implements OnInit { private readonly URI = '/'; i: any; constructor(public http: _HttpClient, private subject: NzModalSubject) { } ngOnInit() { this.http.get(this.URI + this.i.id).subscribe((res: any) => this.i = res.d); } close() { this.subject.destroy(); } }