mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-13 06:13:03 -05:00
feat(challengestandalone): challenge standalone
This commit is contained in:
1
libs/module-to-standalone/user/home/src/index.ts
Normal file
1
libs/module-to-standalone/user/home/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './lib/home.module';
|
||||
@@ -0,0 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'lib-user-home',
|
||||
template: `User Home component`,
|
||||
})
|
||||
export class UserHomeComponent {}
|
||||
11
libs/module-to-standalone/user/home/src/lib/home.module.ts
Normal file
11
libs/module-to-standalone/user/home/src/lib/home.module.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { UserHomeComponent } from './home.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [UserHomeComponent],
|
||||
imports: [
|
||||
RouterModule.forChild([{ path: '', component: UserHomeComponent }]),
|
||||
],
|
||||
})
|
||||
export class UserHomeModule {}
|
||||
8
libs/module-to-standalone/user/home/src/test-setup.ts
Normal file
8
libs/module-to-standalone/user/home/src/test-setup.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment
|
||||
globalThis.ngJest = {
|
||||
testEnvironmentOptions: {
|
||||
errorOnUnknownElements: true,
|
||||
errorOnUnknownProperties: true,
|
||||
},
|
||||
};
|
||||
import 'jest-preset-angular/setup-jest';
|
||||
Reference in New Issue
Block a user