Primeiro commit do projeto Angular

This commit is contained in:
2026-03-14 20:41:55 +00:00
parent 9bebe1de72
commit 94f4f46395
22413 changed files with 3221690 additions and 0 deletions
@@ -0,0 +1,12 @@
import { ApplicationConfig, provideBrowserGlobalErrorListeners<% if(!zoneless) { %>, provideZoneChangeDetection<% } %> } from '@angular/core';<% if (routing) { %>
import { provideRouter } from '@angular/router';
import { routes } from './app.routes';<% } %>
export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),<% if(!zoneless) { %>
provideZoneChangeDetection({ eventCoalescing: true }),<% } %>
<% if (routing) {%>provideRouter(routes)<% } %>
]
};
@@ -0,0 +1,3 @@
import { Routes } from '@angular/router';
export const routes: Routes = [];
@@ -0,0 +1,23 @@
import { TestBed } from '@angular/core/testing';
import { App } from './app<%= suffix %>';
describe('App', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [App],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(App);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it('should render title', <% if(zoneless) { %>async <% } %>() => {
const fixture = TestBed.createComponent(App);
<%= zoneless ? 'await fixture.whenStable();' : 'fixture.detectChanges();' %>
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, <%= name %>');
});
});
@@ -0,0 +1,20 @@
import { Component, signal } from '@angular/core';<% if(routing) { %>
import { RouterOutlet } from '@angular/router';<% } %>
@Component({
selector: '<%= selector %>',
imports: [<% if(routing) { %>RouterOutlet<% } %>],<% if(inlineTemplate) { %>
template: `
<h1>Hello, {{ title() }}</h1>
<% if (routing) {
%><router-outlet /><%
} %>
`,<% } else { %>
templateUrl: './app<%= suffix %>.html',<% } if(inlineStyle) { %>
styles: [],<% } else { %>
styleUrl: './app<%= suffix %>.<%= style %>'<% } %>
})
export class App {
protected readonly title = signal('<%= name %>');
}
@@ -0,0 +1,6 @@
import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { App } from './app/app<%= suffix %>';
bootstrapApplication(App, appConfig)
.catch((err) => console.error(err));