Skip to content

Commit c0951e0

Browse files
committed
Clean up admin modules
1 parent 5c111ac commit c0951e0

File tree

145 files changed

+198
-314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+198
-314
lines changed

apps/codelab/src/app/admin/admin.component.html renamed to apps/codelab/src/app/admin/admin-layout/admin-layout.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<mat-card appearance="outlined">
22
<h2>Angular Codelab 🔥 Admin</h2>
3-
<nav mat-tab-nav-bar>
3+
<nav mat-tab-nav-bar [tabPanel]="tabPanel">
44
<a *ngFor="let link of ['users', 'feedback', 'content',]"
55
mat-tab-link
66
routerLinkActive
@@ -10,5 +10,6 @@ <h2>Angular Codelab 🔥 Admin</h2>
1010
{{ link | titlecase }}
1111
</a>
1212
</nav>
13+
<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel>
1314
<router-outlet></router-outlet>
1415
</mat-card>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { ChangeDetectionStrategy, Component } from '@angular/core';
2+
3+
@Component({
4+
changeDetection: ChangeDetectionStrategy.OnPush,
5+
selector: 'slides-admin-layout',
6+
templateUrl: './admin-layout.component.html',
7+
styleUrls: ['./admin-layout.component.css']
8+
})
9+
export class AdminLayoutComponent {
10+
11+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
import { RouterModule } from '@angular/router';
4+
import { MatCardModule } from '@angular/material/card';
5+
import { MatTabsModule } from '@angular/material/tabs';
6+
import { AdminLayoutComponent } from './admin-layout.component';
7+
8+
@NgModule({
9+
imports: [
10+
CommonModule,
11+
MatCardModule,
12+
MatTabsModule,
13+
RouterModule
14+
],
15+
declarations: [AdminLayoutComponent]
16+
})
17+
export class AdminLayoutModule {
18+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './admin-layout.component';
2+
export * from './admin-layout.module';

apps/codelab/src/app/admin/admin-routing.module.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

apps/codelab/src/app/admin/admin.component.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
11
import { NgModule } from '@angular/core';
2-
import { CommonModule } from '@angular/common';
3-
import { MatCardModule } from '@angular/material/card';
4-
import { MatTabsModule } from '@angular/material/tabs';
5-
import { AdminComponent } from './admin.component';
6-
import { AdminRoutingModule } from './admin-routing.module';
2+
import { RouterModule, Routes } from '@angular/router';
3+
import { UsersComponent, UsersModule } from './pages/users';
4+
import { FeedbackComponent, FeedbackModule } from './pages/feedback';
5+
import { AdminLayoutComponent, AdminLayoutModule } from './admin-layout';
6+
7+
const routes: Routes = [
8+
{
9+
path: '',
10+
component: AdminLayoutComponent,
11+
children: [
12+
{path: 'users', component: UsersComponent},
13+
{path: 'feedback', component: FeedbackComponent},
14+
],
15+
},
16+
{
17+
path: 'content',
18+
loadChildren: () => import('./pages/content').then(m => m.ContentModule)
19+
},
20+
];
21+
722

823
@NgModule({
924
imports: [
10-
CommonModule,
11-
AdminRoutingModule,
12-
MatCardModule,
13-
MatTabsModule
14-
],
15-
declarations: [AdminComponent]
25+
AdminLayoutModule,
26+
UsersModule,
27+
FeedbackModule,
28+
RouterModule.forChild(routes)
29+
]
1630
})
1731
export class AdminModule {
1832
}

apps/codelab/src/app/admin/content/views/presentation-editor/slide-editor/action-bar/action-bar.component.spec.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

apps/codelab/src/app/admin/content/views/presentation-editor/slide-editor/slide-html-editor/slide-html-editor.component.spec.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)