File tree Expand file tree Collapse file tree 5 files changed +23
-3
lines changed
projects/elements-demo/src/app
features/examples/dynamic Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,18 @@ <h2>Dynamic element tag</h2>
26
26
loadingTemplate: loading;
27
27
module: true
28
28
"
29
- [outlined] ="true "
29
+ [outlined] ="buttonTypeIsOutlined "
30
+ [raised] ="!buttonTypeIsOutlined "
30
31
(click) ="increment1() "
31
32
>
32
33
Increment
33
34
</ ax-lazy-element >
34
35
< p > Counter: {{ counter1 }}</ p >
36
+ < div class ="controls ">
37
+ < span > Raised button</ span >
38
+ < mat-slide-toggle [(ngModel)] ="buttonTypeIsOutlined "> </ mat-slide-toggle >
39
+ < span > Outline button</ span >
40
+ </ div >
35
41
</ div >
36
42
< div class ="description ">
37
43
< p >
Original file line number Diff line number Diff line change 29
29
.description {
30
30
flex : 1.5 ;
31
31
}
32
+
33
+ .controls {
34
+ display : flex ;
35
+ align-items : center ;
36
+
37
+ span {
38
+ padding : 20px ;
39
+ }
40
+ }
32
41
}
33
42
}
34
43
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export class DynamicComponent implements OnInit {
16
16
codeExample2html = CODE_EXAMPLE_2_HTML ;
17
17
18
18
// example state
19
+ buttonTypeIsOutlined = true ;
19
20
counter1 = 0 ;
20
21
counter2 = 0 ;
21
22
Original file line number Diff line number Diff line change 1
1
import { CUSTOM_ELEMENTS_SCHEMA , NgModule } from '@angular/core' ;
2
2
import { HighlightModule } from 'ngx-highlightjs' ;
3
+ import { FormsModule } from '@angular/forms' ;
3
4
4
5
import {
5
6
LazyElementModuleOptions ,
@@ -26,6 +27,7 @@ const options: LazyElementModuleOptions = {
26
27
declarations : [ DynamicComponent ] ,
27
28
imports : [
28
29
HighlightModule ,
30
+ FormsModule ,
29
31
LazyElementsModule . forFeature ( options ) ,
30
32
SharedModule ,
31
33
DynamicRoutingModule
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ import {
14
14
MatExpansionModule ,
15
15
MatSnackBarModule ,
16
16
MatSliderModule ,
17
- MatFormFieldModule
17
+ MatFormFieldModule ,
18
+ MatSlideToggleModule
18
19
} from '@angular/material' ;
19
20
import { SpinnerComponent } from './spinner/spinner.component' ;
20
21
import { ErrorComponent } from './error/error.component' ;
@@ -32,7 +33,8 @@ const ANGULAR_MATERIAL_MODULES = [
32
33
MatExpansionModule ,
33
34
MatSnackBarModule ,
34
35
MatSliderModule ,
35
- MatFormFieldModule
36
+ MatFormFieldModule ,
37
+ MatSlideToggleModule
36
38
] ;
37
39
38
40
@NgModule ( {
You can’t perform that action at this time.
0 commit comments