项目初始化
This commit is contained in:
1
_cli-tpl/README.md
Normal file
1
_cli-tpl/README.md
Normal file
@ -0,0 +1 @@
|
||||
[Document](https://ng-alain.com/cli/generate#Custom-template-page)
|
||||
@ -0,0 +1,5 @@
|
||||
<page-header-wrapper>
|
||||
<nz-card>
|
||||
|
||||
</nz-card>
|
||||
</page-header-wrapper>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { <%= componentName %> } from './<%= dasherize(name) %>.component';
|
||||
|
||||
describe('<%= componentName %>', () => {
|
||||
let component: <%= componentName %>;
|
||||
let fixture: ComponentFixture<<%= componentName %>>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ <%= componentName %> ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(<%= componentName %>);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,18 @@
|
||||
import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }%><% if(changeDetection !== 'Default') { %>, ChangeDetectionStrategy<% }%> } from '@angular/core';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
|
||||
@Component({
|
||||
selector: '<%= selector %>',
|
||||
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 <%= componentName %> implements OnInit {
|
||||
|
||||
constructor(private http: _HttpClient, private msg: NzMessageService) { }
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
<page-grid>
|
||||
<nz-card> </nz-card>
|
||||
</page-grid>
|
||||
@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { <%= componentName %> } from './<%= dasherize(name) %>.component';
|
||||
|
||||
describe('<%= componentName %>', () => {
|
||||
let component: <%= componentName %>;
|
||||
let fixture: ComponentFixture<<%= componentName %>>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ <%= componentName %> ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(<%= componentName %>);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,18 @@
|
||||
import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }%><% if(changeDetection !== 'Default') { %>, ChangeDetectionStrategy<% }%> } from '@angular/core';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
|
||||
@Component({
|
||||
selector: '<%= selector %>',
|
||||
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 <%= componentName %> implements OnInit {
|
||||
|
||||
constructor(private http: _HttpClient, private msg: NzMessageService) { }
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<page-header></page-header>
|
||||
@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { <%= componentName %> } from './<%= dasherize(name) %>.component';
|
||||
|
||||
describe('<%= componentName %>', () => {
|
||||
let component: <%= componentName %>;
|
||||
let fixture: ComponentFixture<<%= componentName %>>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ <%= componentName %> ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(<%= componentName %>);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,18 @@
|
||||
import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }%><% if(changeDetection !== 'Default') { %>, ChangeDetectionStrategy<% }%> } from '@angular/core';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
|
||||
@Component({
|
||||
selector: '<%= selector %>',
|
||||
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 <%= componentName %> implements OnInit {
|
||||
|
||||
constructor(private http: _HttpClient, private msg: NzMessageService) { }
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user