Primeiro commit do projeto Angular
This commit is contained in:
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
<% if(displayBlock){ if(style != 'sass') { %>:host {
|
||||
display: block;
|
||||
}
|
||||
<% } else { %>\:host
|
||||
display: block;
|
||||
<% }} %>
|
||||
Generated
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import <% if(!exportDefault) { %>{ <% }%><%= classifiedName %> <% if(!exportDefault) {%>} <% }%>from './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>';
|
||||
|
||||
describe('<%= classifiedName %>', () => {
|
||||
let component: <%= classifiedName %>;
|
||||
let fixture: ComponentFixture<<%= classifiedName %>>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
<%= standalone ? 'imports' : 'declarations' %>: [<%= classifiedName %>]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(<%= classifiedName %>);
|
||||
component = fixture.componentInstance;
|
||||
<%= zoneless ? 'await fixture.whenStable();' : 'fixture.detectChanges();' %>
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
Generated
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
import { <% if(changeDetection !== 'Default') { %>ChangeDetectionStrategy, <% }%>Component<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }%> } from '@angular/core';
|
||||
|
||||
@Component({<% if(!skipSelector) {%>
|
||||
selector: '<%= selector %>',<%}%><% if(standalone) {%>
|
||||
imports: [],<%} else { %>
|
||||
standalone: false,<% }%><% if(inlineTemplate) { %>
|
||||
template: `
|
||||
<p>
|
||||
<%= dasherize(name) %> works!
|
||||
</p>
|
||||
`,<% } else { %>
|
||||
templateUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %><%= ngext %>.html',<% } if(inlineStyle) { %>
|
||||
styles: `<% if(displayBlock){ %>
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
<% } %>`,<% } else if (style !== 'none') { %>
|
||||
styleUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.<%= style %>',<% } %><% if(!!viewEncapsulation) { %>
|
||||
encapsulation: ViewEncapsulation.<%= viewEncapsulation %>,<% } if (changeDetection !== 'Default') { %>
|
||||
changeDetection: ChangeDetectionStrategy.<%= changeDetection %>,<% } %>
|
||||
})
|
||||
export <% if(exportDefault) {%>default <%}%>class <%= classifiedName %> {
|
||||
|
||||
}
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
<p><%= dasherize(name) %> works!</p>
|
||||
Reference in New Issue
Block a user