This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(modules): Move all components to modules, for AoT
- Loading branch information
1 parent
71bee32
commit 1e2ffb5
Showing
107 changed files
with
2,935 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Routes } from '@angular/router'; | ||
|
||
export const DemoRoutes: Routes = [ | ||
{ path: '', redirectTo: '/home', pathMatch: 'full' }, | ||
{ | ||
path: 'home', | ||
data: ['Home'], | ||
loadChildren: './pages/home-page/home-page.module#HomePageModule' | ||
}, | ||
{ | ||
path: 'themes', | ||
data: ['Themes'], | ||
loadChildren: './pages/themes-page/themes-page.module#ThemesPageModule' | ||
}/*, | ||
{ | ||
path: 'admin', | ||
data: ['Admin'], | ||
loadChildren: '../../../dist/pages/admin-page/admin-page.module#AdminPageModule' | ||
}, | ||
{ | ||
path: 'account', | ||
data: ['Account'], | ||
loadChildren: '../../../dist/pages/account-page/account-page.module#AccountPageModule' | ||
}*/ | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { NgModule, ModuleWithProviders } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { DemoNavbarComponent } from './navbar.component'; | ||
import { ConfirmModalModule, AuthModalModule } from '../../../../../../dist'; | ||
import { CollapseModule } from 'ng2-bootstrap'; | ||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
ConfirmModalModule.forRoot(), | ||
AuthModalModule.forRoot(), | ||
CollapseModule.forRoot() | ||
], | ||
declarations: [ | ||
DemoNavbarComponent | ||
], | ||
exports: [ | ||
DemoNavbarComponent | ||
], | ||
entryComponents: [DemoNavbarComponent] | ||
}) | ||
export class DemoNavbarModule { | ||
public static forRoot(): ModuleWithProviders { | ||
return { | ||
ngModule: DemoNavbarModule, | ||
providers: [] | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class="container-fluid"> | ||
<page-header [title]="title"></page-header> | ||
<div [innerHtml]="readme"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.home-page { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { TranslateService } from '@ngx-translate/core'; | ||
import { AppService } from '../../../../../../dist'; | ||
|
||
let readme = '';//require('html-loader!markdown-loader!./../../../README.md'); | ||
|
||
@Component({ | ||
selector: 'home-page', | ||
templateUrl: './home-page.component.html', | ||
styleUrls: ['./home-page.component.scss'] | ||
}) | ||
|
||
export class HomePageComponent implements OnInit { | ||
|
||
public title: string; | ||
public readme: string = readme; | ||
constructor(public app: AppService, | ||
public translateService: TranslateService) { | ||
this.title = this.translateService.instant('Home'); | ||
} | ||
|
||
ngOnInit() { | ||
this.init(); | ||
} | ||
init() { | ||
this.app.currentPageName = 'home'; | ||
this.app.currentPageTitle = this.title; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { NgModule, ModuleWithProviders } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { HomePageComponent } from './home-page.component'; | ||
import { RouterModule } from '@angular/router'; | ||
import { HomePageRoutes } from './home-page.routes'; | ||
import { PageHeaderModule, SharedModule } from '../../../../../../dist'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
SharedModule.forRoot(), | ||
PageHeaderModule.forRoot(), | ||
RouterModule.forChild(HomePageRoutes) | ||
], | ||
declarations: [HomePageComponent], | ||
exports: [HomePageComponent], | ||
entryComponents: [HomePageComponent] | ||
}) | ||
export class HomePageModule { | ||
public static forRoot(): ModuleWithProviders { | ||
return { | ||
ngModule: HomePageModule, | ||
providers: [] | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { HomePageComponent } from './home-page.component'; | ||
export const HomePageRoutes = [{ path: '', component: HomePageComponent }]; |
Oops, something went wrong.