main.ts
angular/comprehensive-demo/src/main.ts
/**
* Application Bootstrap
*
* This is the entry point of the Angular application.
*
* Bootstrap Process:
* 1. Angular bootstraps the root component (AppComponent)
* 2. AppComponent renders and initializes
* 3. Router takes over and displays the appropriate component
*
* Standalone Bootstrap (Angular 14+):
* - No NgModule needed
* - Direct component bootstrap
* - Simpler and more modern approach
*/
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';
import { appConfig } from './app/app.config';
/**
* Bootstrap the application
*
* bootstrapApplication is the modern way to start an Angular app.
* It takes:
* - Root component (AppComponent)
* - Application configuration (appConfig)
*/
bootstrapApplication(AppComponent, appConfig)
.catch((err) => console.error('Error bootstrapping application:', err));
関連記事
server.js
server.js — javascript source code from the angular learning materials (angular/comprehensive-demo/server/server.js).
記事を読む →app.component.ts
app.component.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.component.ts).
記事を読む →app.config.ts
app.config.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.config.ts).
記事を読む →app.routes.ts
app.routes.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.routes.ts).
記事を読む →auth.guard.ts
auth.guard.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/core/guards/auth.guard.ts).
記事を読む →role.guard.ts
role.guard.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/core/guards/role.guard.ts).
記事を読む →