mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-12 13:53:03 -05:00
feat(doc): move module to standalone
This commit is contained in:
27
apps/angular/module-to-standalone/src/app/app.component.ts
Normal file
27
apps/angular/module-to-standalone/src/app/app.component.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
template: ` <div class="flex gap-2">
|
||||
<button
|
||||
routerLink="home"
|
||||
class="border px-4 py-2 border-blue-400 rounded-md">
|
||||
Home
|
||||
</button>
|
||||
<button
|
||||
routerLink="admin"
|
||||
class="border px-4 py-2 border-blue-400 rounded-md">
|
||||
Admin
|
||||
</button>
|
||||
<button
|
||||
routerLink="user"
|
||||
class="border px-4 py-2 border-blue-400 rounded-md">
|
||||
User
|
||||
</button>
|
||||
</div>
|
||||
<router-outlet></router-outlet>`,
|
||||
host: {
|
||||
class: 'flex flex-col p-4 gap-3',
|
||||
},
|
||||
})
|
||||
export class AppComponent {}
|
||||
11
apps/angular/module-to-standalone/src/app/app.module.ts
Normal file
11
apps/angular/module-to-standalone/src/app/app.module.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { MainShellModule } from '@angular-challenges/module-to-standalone/shell';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
imports: [BrowserModule, MainShellModule],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {}
|
||||
BIN
apps/angular/module-to-standalone/src/favicon.ico
Normal file
BIN
apps/angular/module-to-standalone/src/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
13
apps/angular/module-to-standalone/src/index.html
Normal file
13
apps/angular/module-to-standalone/src/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>module-to-standalone</title>
|
||||
<base href="/" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
6
apps/angular/module-to-standalone/src/main.ts
Normal file
6
apps/angular/module-to-standalone/src/main.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { AppModule } from './app/app.module';
|
||||
|
||||
platformBrowserDynamic()
|
||||
.bootstrapModule(AppModule)
|
||||
.catch((err) => console.error(err));
|
||||
5
apps/angular/module-to-standalone/src/styles.scss
Normal file
5
apps/angular/module-to-standalone/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