mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-12 22:03:03 -05:00
fix: generator
This commit is contained in:
27
apps/nx/42-static-vs-dynamic-import/src/app/app.component.ts
Normal file
27
apps/nx/42-static-vs-dynamic-import/src/app/app.component.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import {
|
||||
UserComponent,
|
||||
type User,
|
||||
} from '@angular-challenges/static-dynamic-import/users';
|
||||
import { Component } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [UserComponent, RouterOutlet],
|
||||
selector: 'app-root',
|
||||
template: `
|
||||
Author:
|
||||
<sdi-user [user]="author" />
|
||||
<router-outlet />
|
||||
`,
|
||||
host: {
|
||||
class: 'flex flex-col',
|
||||
},
|
||||
})
|
||||
export class AppComponent {
|
||||
author: User = {
|
||||
name: 'Thomas',
|
||||
lastName: 'Laforge',
|
||||
country: 'France',
|
||||
};
|
||||
}
|
||||
16
apps/nx/42-static-vs-dynamic-import/src/app/app.config.ts
Normal file
16
apps/nx/42-static-vs-dynamic-import/src/app/app.config.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
import { provideAnimations } from '@angular/platform-browser/animations';
|
||||
import { provideRouter } from '@angular/router';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideAnimations(),
|
||||
provideRouter([
|
||||
{
|
||||
path: '',
|
||||
loadComponent: () =>
|
||||
import('@angular-challenges/static-dynamic-import/users'),
|
||||
},
|
||||
]),
|
||||
],
|
||||
};
|
||||
BIN
apps/nx/42-static-vs-dynamic-import/src/favicon.ico
Normal file
BIN
apps/nx/42-static-vs-dynamic-import/src/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
16
apps/nx/42-static-vs-dynamic-import/src/index.html
Normal file
16
apps/nx/42-static-vs-dynamic-import/src/index.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>nx-static-dynamic-import</title>
|
||||
<base href="/" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||
rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
7
apps/nx/42-static-vs-dynamic-import/src/main.ts
Normal file
7
apps/nx/42-static-vs-dynamic-import/src/main.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
import { AppComponent } from './app/app.component';
|
||||
import { appConfig } from './app/app.config';
|
||||
|
||||
bootstrapApplication(AppComponent, appConfig).catch((err) =>
|
||||
console.error(err),
|
||||
);
|
||||
5
apps/nx/42-static-vs-dynamic-import/src/styles.scss
Normal file
5
apps/nx/42-static-vs-dynamic-import/src/styles.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
Reference in New Issue
Block a user