feat: challenge 42

This commit is contained in:
thomas
2024-01-02 09:51:18 +01:00
parent 68178c6d76
commit e619bc403b
31 changed files with 656 additions and 7 deletions

View File

@@ -0,0 +1,26 @@
import {
UserPipe,
type User,
} from '@angular-challenges/static-dynamic-import/users';
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
@Component({
standalone: true,
imports: [UserPipe, RouterOutlet],
selector: 'app-root',
template: `
Author: {{ author | user }}
<router-outlet />
`,
host: {
class: 'flex flex-col',
},
})
export class AppComponent {
author: User = {
name: 'Thomas',
lastname: 'Laforge',
country: 'France',
};
}

View File

@@ -0,0 +1,14 @@
import { ApplicationConfig } from '@angular/core';
import { provideRouter } from '@angular/router';
export const appConfig: ApplicationConfig = {
providers: [
provideRouter([
{
path: '',
loadComponent: () =>
import('@angular-challenges/static-dynamic-import/users'),
},
]),
],
};