-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ngx-material-pages): added the main ngx-material-pages component
- Loading branch information
1 parent
7bb6be4
commit 509ff32
Showing
4 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
src/module/ngx-material-pages/ngx-material-pages.component.html
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,65 @@ | ||
<mat-sidenav-container> | ||
<mat-sidenav #start [mode]="'side'" opened="true" | ||
[fixedInViewport]="'false'" [fixedTopGap]="'false'" [fixedBottomGap]="'false'"> | ||
|
||
<mat-toolbar color="primary"> | ||
</mat-toolbar> | ||
|
||
<mat-vertical-stepper> | ||
<mat-step *ngFor="let page of pages;let i = index;"> | ||
<ng-container [ngTemplateOutlet]="page.pagesOutlook.content"></ng-container> | ||
</mat-step> | ||
</mat-vertical-stepper> | ||
</mat-sidenav> | ||
|
||
<mat-sidenav-content> | ||
<mat-toolbar color="primary"> | ||
<button mat-icon-button> | ||
<mat-icon>menu</mat-icon> | ||
</button> | ||
ngx-auth-firebaseui - npm install | ||
</mat-toolbar> | ||
<div class="demo-sidenav-content main-container"> | ||
|
||
<mat-tab-group [selectedIndex]="index" style="height: 80vh;"> | ||
<button mat-fab color="warn" (click)="previous()"> | ||
<mat-icon>location</mat-icon> | ||
</button> | ||
<mat-tab style="background: blue; margin: 2rem;"> | ||
<mat-card style="background: red; margin: 5rem; height: 1300px"> | ||
<mat-card-title> | ||
Title1 | ||
</mat-card-title> | ||
<mat-card-content> | ||
<h2>test</h2> | ||
</mat-card-content> | ||
</mat-card> | ||
</mat-tab> | ||
<!--<mat-tab>--> | ||
<!--<step-content>--> | ||
<!--<mat-card style="background: yellow; margin: 5rem; height: 700px">--> | ||
<!--<mat-card-title>--> | ||
<!--Title2--> | ||
<!--</mat-card-title>--> | ||
<!--<mat-card-content>--> | ||
<!--<h2>test</h2>--> | ||
<!--</mat-card-content>--> | ||
<!--</mat-card>--> | ||
<!--</step-content>--> | ||
<!--</mat-tab>--> | ||
</mat-tab-group> | ||
|
||
|
||
<div fxLayoutAlign="space-between" style="margin: 1rem"> | ||
<button mat-fab color="primary" (click)="previous()"> | ||
<mat-icon>chevron_left</mat-icon> | ||
</button> | ||
<button mat-fab color="primary" (click)="next()"> | ||
<mat-icon>chevron_right</mat-icon> | ||
</button> | ||
</div> | ||
|
||
<!--<button mat-button (click)="start.toggle(undefined, 'mouse')">Toggle Start Side Sidenav</button>--> | ||
</div> | ||
</mat-sidenav-content> | ||
</mat-sidenav-container> |
Empty file.
25 changes: 25 additions & 0 deletions
25
src/module/ngx-material-pages/ngx-material-pages.component.spec.ts
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 { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { NgxMaterialPagesComponent } from './ngx-material-pages.component'; | ||
|
||
describe('NgxMaterialPagesComponent', () => { | ||
let component: NgxMaterialPagesComponent; | ||
let fixture: ComponentFixture<NgxMaterialPagesComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ NgxMaterialPagesComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(NgxMaterialPagesComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
34 changes: 34 additions & 0 deletions
34
src/module/ngx-material-pages/ngx-material-pages.component.ts
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,34 @@ | ||
import { | ||
AfterContentInit, | ||
ChangeDetectionStrategy, | ||
Component, | ||
ContentChildren, | ||
forwardRef, | ||
OnInit, | ||
QueryList, | ||
ViewEncapsulation | ||
} from '@angular/core'; | ||
import {NgxMaterialPageLoaderComponent} from './ngx-material-page-loader/ngx-material-page-loader.component'; | ||
|
||
@Component({ | ||
selector: 'ngx-material-pages', | ||
templateUrl: './ngx-material-pages.component.html', | ||
styleUrls: ['./ngx-material-pages.component.scss'], | ||
encapsulation: ViewEncapsulation.None, | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class NgxMaterialPagesComponent implements OnInit, AfterContentInit { | ||
|
||
@ContentChildren(NgxMaterialPageLoaderComponent) pages: QueryList<NgxMaterialPageLoaderComponent>; | ||
|
||
constructor() { | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
|
||
ngAfterContentInit() { | ||
console.log('pagesOutlook', this.pages); | ||
} | ||
|
||
} |