Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
35
my-app/node_modules/@schematics/angular/application/files/module-files/src/app/app.component.spec.ts.template
generated
vendored
Executable file
35
my-app/node_modules/@schematics/angular/application/files/module-files/src/app/app.component.spec.ts.template
generated
vendored
Executable file
|
@ -0,0 +1,35 @@
|
|||
import { TestBed } from '@angular/core/testing';<% if (routing) { %>
|
||||
import { RouterTestingModule } from '@angular/router/testing';<% } %>
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({<% if (routing) { %>
|
||||
imports: [
|
||||
RouterTestingModule
|
||||
],<% } %>
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title '<%= name %>'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('<%= name %>');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement as HTMLElement;
|
||||
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, <%= name %>');
|
||||
});
|
||||
});
|
18
my-app/node_modules/@schematics/angular/application/files/module-files/src/app/app.component.ts.template
generated
vendored
Executable file
18
my-app/node_modules/@schematics/angular/application/files/module-files/src/app/app.component.ts.template
generated
vendored
Executable file
|
@ -0,0 +1,18 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: '<%= selector %>',<% if(inlineTemplate) { %>
|
||||
template: `
|
||||
<h1>Welcome to {{title}}!</h1>
|
||||
|
||||
<% if (routing) {
|
||||
%><router-outlet /><%
|
||||
} %>
|
||||
`,<% } else { %>
|
||||
templateUrl: './app.component.html',<% } if(inlineStyle) { %>
|
||||
styles: []<% } else { %>
|
||||
styleUrl: './app.component.<%= style %>'<% } %>
|
||||
})
|
||||
export class AppComponent {
|
||||
title = '<%= name %>';
|
||||
}
|
18
my-app/node_modules/@schematics/angular/application/files/module-files/src/app/app.module.ts.template
generated
vendored
Executable file
18
my-app/node_modules/@schematics/angular/application/files/module-files/src/app/app.module.ts.template
generated
vendored
Executable file
|
@ -0,0 +1,18 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
<% if (routing) { %>
|
||||
import { AppRoutingModule } from './app-routing.module';<% } %>
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule<% if (routing) { %>,
|
||||
AppRoutingModule<% } %>
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
13
my-app/node_modules/@schematics/angular/application/files/module-files/src/main.ts.template
generated
vendored
Executable file
13
my-app/node_modules/@schematics/angular/application/files/module-files/src/main.ts.template
generated
vendored
Executable file
|
@ -0,0 +1,13 @@
|
|||
<% if(!!viewEncapsulation) { %>import { ViewEncapsulation } from '@angular/core';
|
||||
<% }%>import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
|
||||
<% if(!!viewEncapsulation) { %>
|
||||
platformBrowserDynamic().bootstrapModule(AppModule, {
|
||||
defaultEncapsulation: ViewEncapsulation.<%= viewEncapsulation %>
|
||||
})
|
||||
.catch(err => console.error(err));<% } else { %>
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
<% } %>
|
Loading…
Add table
Add a link
Reference in a new issue