feat(challengestandalone): challenge standalone

This commit is contained in:
ThomasL
2023-06-19 18:06:50 +02:00
parent bcf44956f9
commit 8f6716979e
165 changed files with 2794 additions and 22 deletions

View File

@@ -0,0 +1,27 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
@NgModule({
declarations: [],
imports: [
CommonModule,
RouterModule.forChild([
{
path: '',
loadChildren: () =>
import('./dashboard/dashboard.component').then(
(m) => m.ContactDashboardModule
),
},
{
path: 'create-contact',
loadChildren: () =>
import('./create-contact/create-contact.component').then(
(m) => m.CreateContactModule
),
},
]),
],
})
export class ContactFeatureModule {}

View File

@@ -0,0 +1,22 @@
import { Component, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
@Component({
selector: 'lib-create-contact',
template: `Create Contact Form
<button
routerLink=".."
class="border bg-gray-700 rounded-lg p-2 text-white ml-5">
Back
</button> `,
})
export class CreateContactComponent {}
@NgModule({
imports: [
RouterModule.forChild([{ path: '', component: CreateContactComponent }]),
],
declarations: [CreateContactComponent],
})
export class CreateContactModule {}

View File

@@ -0,0 +1,22 @@
import { Component, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
@Component({
selector: 'lib-contact-dashboard',
template: `Contact Dashboard
<button
routerLink="create-contact"
class="border bg-gray-700 rounded-lg p-2 text-white ml-10">
Create contact
</button> `,
})
export class ContactDashboardComponent {}
@NgModule({
imports: [
RouterModule.forChild([{ path: '', component: ContactDashboardComponent }]),
],
declarations: [ContactDashboardComponent],
})
export class ContactDashboardModule {}