Skip to content

Commit 92d8475

Browse files
committed
fix(demo): updated the dialogs route
1 parent 4730e7a commit 92d8475

File tree

6 files changed

+68
-6
lines changed

6 files changed

+68
-6
lines changed

demo/src/app/features/dialogs/dialogs.component.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
1+
<div class="jumbotron jumbotron-fluid">
2+
<div class="container">
3+
<div class="row">
4+
<div class="col-sm-4 d-flex justify-content-center justify-content-md-end">
5+
<img src="assets/logo.svg" alt="core logo" class="logo">
6+
</div>
7+
<div class="col-sm-8 text-center text-md-left">
8+
<h1>MatDialogsModule</h1>
9+
<p>Beautiful prebuilt material dialogs</p>
10+
<p>Scroll down to see it in action!</p>
11+
<p class="buttons">
12+
<a class="btn btn-outline-primary btn-lg" href="https://github.com/angular-material-extensions/core"
13+
target="_blank"><i class="fa fa-github fa-lg"></i> Code on Github</a>
14+
<a class="btn btn-outline-primary btn-lg" href="doc/index.html" target="_blank"><i
15+
class="fa fa-book fa-lg"></i> Documentation</a>
16+
<a class="btn btn-outline-primary btn-lg" href="#" (click)="editOnStackBlitz()"><i
17+
class="fa fa-bolt fa-lg"></i> Edit on StackBlitz</a>
18+
</p>
19+
</div>
20+
</div>
21+
</div>
22+
</div>
23+
124
<div [fxHide]="shouldHide" class="container">
225

26+
<markdown src="assets/md/dialogs/INSTALLATION.md"></markdown>
27+
328
<mat-card class="example-card">
429
<mat-card-title>Material Alert Dialog (Default)</mat-card-title>
530
<mat-card-content fxLayout="column" fxLayoutAlign="center center">

demo/src/app/features/dialogs/dialogs.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
MatSelectDialogData
1515
} from '@angular-material-extensions/core';
1616
import {MatDialog} from '@angular/material';
17+
import sdk from '@stackblitz/sdk';
1718

1819
@Component({
1920
selector: 'app-dialogs',
@@ -56,6 +57,10 @@ export class DialogsComponent implements OnInit {
5657
ngOnInit() {
5758
}
5859

60+
editOnStackBlitz() {
61+
sdk.openGithubProject('angular-material-extensions/core/tree/master/demo');
62+
}
63+
5964
openAlertDialog(matAlertDialogData: MatAlertDialogData) {
6065
this.shouldHide = true;
6166
this.dialog

demo/src/app/home/home.component.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<img src="assets/logo.svg" alt="core logo" class="logo">
66
</div>
77
<div class="col-sm-8 text-center text-md-left">
8-
<h1>core</h1>
8+
<h1>@angular-material-extensions/core</h1>
99
<p>Set of components, directives and services to boost the app development with angular material 2</p>
1010
<p>Scroll down to see it in action!</p>
1111
<p class="buttons">
@@ -18,7 +18,6 @@ <h1>core</h1>
1818
</p>
1919
</div>
2020
</div>
21-
2221
</div>
2322
</div>
2423

demo/src/app/home/home.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class HomeComponent implements OnInit {
1919
}
2020

2121
ngOnInit() {
22-
this.titleService.setTitle('Home | core');
22+
this.titleService.setTitle('@angular-material-extensions/core');
2323
}
2424

2525
editOnStackBlitz() {

demo/src/app/home/home.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ import {NgModule} from '@angular/core';
22
import {CommonModule} from '@angular/common';
33
import {HomeRoutingModule} from './home-routing.module';
44
import {HomeComponent} from './home.component';
5-
import {MatDialogsModule} from '@angular-material-extensions/core';
5+
import {MatCoreModule, MatDialogsModule} from '@angular-material-extensions/core';
66
import {MatButtonModule, MatCardModule, MatDialogModule} from '@angular/material';
7-
import { MatLanguageMenuComponent } from '../../../../src/module/components/mat-language-menu/mat-language-menu.component';
87

98
@NgModule({
109
imports: [
1110
CommonModule,
1211
HomeRoutingModule,
12+
MatCoreModule,
1313
MatDialogsModule,
1414
MatDialogModule,
1515
MatButtonModule,
1616
MatCardModule
1717
],
18-
declarations: [HomeComponent, MatLanguageMenuComponent],
18+
declarations: [HomeComponent],
1919
})
2020
export class HomeModule {
2121
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Installation
2+
3+
install `@angular-material-extensions/core` via:
4+
```shell
5+
npm install --save @angular-material-extensions/core
6+
```
7+
8+
## Import the library
9+
10+
Once installed you need to import the main module:
11+
```js
12+
import { MatDialogsModule } from '@angular-material-extensions/core';
13+
```
14+
The only remaining part is to list the imported module in your application module. The exact method will be slightly
15+
different for the root (top-level) module for which you should end up with the code similar to (notice ` MatPasswordStrengthModule .forRoot()`):
16+
```js
17+
import { MatDialogsModule } from '@angular-material-extensions/core';
18+
import { MatDialogModule } from '@angular/material';
19+
20+
@NgModule({
21+
declarations: [AppComponent, ...],
22+
imports: [
23+
MatDialogsModule,
24+
MatDialogModule,
25+
...],
26+
bootstrap: [AppComponent]
27+
})
28+
export class AppModule {
29+
30+
constructor(public dialog: MatDialog) {
31+
}
32+
}
33+
```

0 commit comments

Comments
 (0)