Updated the files.

This commit is contained in:
Batuhan Berk Başoğlu 2024-02-08 19:38:41 -05:00
parent 1553e6b971
commit 753967d4f5
23418 changed files with 3784666 additions and 0 deletions

View file

@ -0,0 +1,29 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have the '<%= name %>' title`, () => {
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 %>');
});
});

View file

@ -0,0 +1,21 @@
import { Component } from '@angular/core';<% if(routing) { %>
import { RouterOutlet } from '@angular/router';<% } %>
@Component({
selector: '<%= selector %>',
standalone: true,
imports: [<% if(routing) { %>RouterOutlet<% } %>],<% 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 %>';
}

View file

@ -0,0 +1,8 @@
import { ApplicationConfig } from '@angular/core';<% if (routing) { %>
import { provideRouter } from '@angular/router';
import { routes } from './app.routes';<% } %>
export const appConfig: ApplicationConfig = {
providers: [<% if (routing) { %>provideRouter(routes)<% } %>]
};

View file

@ -0,0 +1,3 @@
import { Routes } from '@angular/router';
export const routes: Routes = [];

View file

@ -0,0 +1,6 @@
import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { AppComponent } from './app/app.component';
bootstrapApplication(AppComponent, appConfig)
.catch((err) => console.error(err));