File tree 14 files changed +143
-105
lines changed
projects/angular-intl-demo/src/app
14 files changed +143
-105
lines changed Original file line number Diff line number Diff line change 51
51
"outputPath" : " dist/angular-intl-demo" ,
52
52
"index" : " projects/angular-intl-demo/src/index.html" ,
53
53
"browser" : " projects/angular-intl-demo/src/main.ts" ,
54
- "polyfills" : [" zone.js" ],
55
54
"tsConfig" : " projects/angular-intl-demo/tsconfig.app.json" ,
56
55
"inlineStyleLanguage" : " scss" ,
57
56
"assets" : [
Original file line number Diff line number Diff line change 1
1
import { provideHttpClient } from '@angular/common/http' ;
2
- import { ApplicationConfig } from '@angular/core' ;
3
2
import {
4
- MAT_FORM_FIELD_DEFAULT_OPTIONS ,
5
- MatFormFieldDefaultOptions ,
6
- } from '@angular/material/form-field' ;
7
- import { provideAnimations } from '@angular/platform-browser/animations' ;
3
+ ApplicationConfig ,
4
+ provideZonelessChangeDetection ,
5
+ } from '@angular/core' ;
8
6
import { provideRouter , withHashLocation } from '@angular/router' ;
9
7
import { provideMarkdown } from 'ngx-markdown' ;
10
8
import { routes } from './app.routes' ;
11
9
12
10
export const appConfig : ApplicationConfig = {
13
11
providers : [
12
+ provideZonelessChangeDetection ( ) ,
14
13
provideMarkdown ( ) ,
15
- {
16
- provide : MAT_FORM_FIELD_DEFAULT_OPTIONS ,
17
- useValue : {
18
- subscriptSizing : 'dynamic' ,
19
- } satisfies MatFormFieldDefaultOptions ,
20
- } ,
21
- provideAnimations ( ) ,
22
14
provideHttpClient ( ) ,
23
15
provideRouter ( routes , withHashLocation ( ) ) ,
24
16
] ,
Original file line number Diff line number Diff line change 1
1
import { Component , computed , signal } from '@angular/core' ;
2
2
import { FormsModule } from '@angular/forms' ;
3
- import { MatOptionModule } from '@angular/material/core' ;
4
- import { MatFormFieldModule } from '@angular/material/form-field' ;
5
- import { MatSelectModule } from '@angular/material/select' ;
3
+ import { MatFormField , MatLabel } from '@angular/material/form-field' ;
4
+ import { MatOption , MatSelect } from '@angular/material/select' ;
6
5
import {
7
6
IntlCountryPipe ,
8
7
IntlCountryPipeOptions ,
@@ -15,11 +14,12 @@ import { countries } from './countries';
15
14
templateUrl : './country.component.html' ,
16
15
styleUrls : [ './country.component.scss' ] ,
17
16
imports : [
18
- MatFormFieldModule ,
19
- MatSelectModule ,
20
17
FormsModule ,
21
- MatOptionModule ,
22
18
IntlCountryPipe ,
19
+ MatFormField ,
20
+ MatSelect ,
21
+ MatOption ,
22
+ MatLabel ,
23
23
] ,
24
24
} )
25
25
export class CountryComponent {
Original file line number Diff line number Diff line change 1
1
import { Component , computed , signal } from '@angular/core' ;
2
2
import { FormsModule } from '@angular/forms' ;
3
- import { MatOptionModule } from '@angular/material/core' ;
4
- import { MatFormFieldModule } from '@angular/material/form-field' ;
5
- import { MatInputModule } from '@angular/material/input' ;
6
- import { MatSelectModule } from '@angular/material/select' ;
3
+ import { MatError , MatFormField , MatLabel } from '@angular/material/form-field' ;
4
+ import { MatInput } from '@angular/material/input' ;
5
+ import { MatOption , MatSelect } from '@angular/material/select' ;
7
6
import {
8
7
IntlCurrencyPipe ,
9
8
IntlCurrencyPipeOptions ,
@@ -16,12 +15,14 @@ import { currencies } from './currencies';
16
15
templateUrl : './currency.component.html' ,
17
16
styleUrls : [ './currency.component.scss' ] ,
18
17
imports : [
19
- MatFormFieldModule ,
20
- MatInputModule ,
21
18
FormsModule ,
22
- MatSelectModule ,
23
- MatOptionModule ,
24
19
IntlCurrencyPipe ,
20
+ MatFormField ,
21
+ MatInput ,
22
+ MatSelect ,
23
+ MatOption ,
24
+ MatLabel ,
25
+ MatError ,
25
26
] ,
26
27
} )
27
28
export class CurrencyComponent {
Original file line number Diff line number Diff line change 1
1
import { Component , computed , signal } from '@angular/core' ;
2
2
import { FormsModule } from '@angular/forms' ;
3
- import { MatButtonModule } from '@angular/material/button' ;
4
- import { MatOptionModule } from '@angular/material/core' ;
5
- import { MatFormFieldModule } from '@angular/material/form-field' ;
6
- import { MatIconModule } from '@angular/material/icon' ;
7
- import { MatInputModule } from '@angular/material/input' ;
8
- import { MatSelectModule } from '@angular/material/select' ;
3
+ import { MatIconButton } from '@angular/material/button' ;
4
+ import { MatOption } from '@angular/material/core' ;
5
+ import {
6
+ MatFormField ,
7
+ MatLabel ,
8
+ MatSuffix ,
9
+ } from '@angular/material/form-field' ;
10
+ import { MatIcon } from '@angular/material/icon' ;
11
+ import { MatInput } from '@angular/material/input' ;
12
+ import { MatSelect } from '@angular/material/select' ;
9
13
import { IntlDatePipe , IntlDatePipeOptions } from 'angular-ecmascript-intl' ;
10
14
import { languages } from '../../languages' ;
11
15
import { getDateString } from '../date-utils' ;
@@ -15,14 +19,16 @@ import { getDateString } from '../date-utils';
15
19
templateUrl : './date.component.html' ,
16
20
styleUrls : [ './date.component.scss' ] ,
17
21
imports : [
18
- MatFormFieldModule ,
19
- MatInputModule ,
20
22
FormsModule ,
21
- MatButtonModule ,
22
- MatIconModule ,
23
- MatSelectModule ,
24
- MatOptionModule ,
25
23
IntlDatePipe ,
24
+ MatFormField ,
25
+ MatInput ,
26
+ MatIconButton ,
27
+ MatIcon ,
28
+ MatSelect ,
29
+ MatOption ,
30
+ MatLabel ,
31
+ MatSuffix ,
26
32
] ,
27
33
} )
28
34
export class DateComponent {
Original file line number Diff line number Diff line change 1
1
import { Component , computed , signal } from '@angular/core' ;
2
2
import { FormsModule } from '@angular/forms' ;
3
- import { MatOptionModule } from '@angular/material/core' ;
4
- import { MatFormFieldModule } from '@angular/material/form-field' ;
5
- import { MatInputModule } from '@angular/material/input' ;
6
- import { MatSelectModule } from '@angular/material/select' ;
3
+ import { MatOption } from '@angular/material/core' ;
4
+ import { MatError , MatFormField , MatLabel } from '@angular/material/form-field' ;
5
+ import { MatInput } from '@angular/material/input' ;
6
+ import { MatSelect } from '@angular/material/select' ;
7
7
import {
8
8
IntlDecimalPipe ,
9
9
IntlDecimalPipeOptions ,
@@ -15,12 +15,14 @@ import { languages } from '../../languages';
15
15
templateUrl : './decimal.component.html' ,
16
16
styleUrls : [ './decimal.component.scss' ] ,
17
17
imports : [
18
- MatFormFieldModule ,
19
- MatInputModule ,
20
18
FormsModule ,
21
- MatSelectModule ,
22
- MatOptionModule ,
23
19
IntlDecimalPipe ,
20
+ MatFormField ,
21
+ MatInput ,
22
+ MatSelect ,
23
+ MatOption ,
24
+ MatLabel ,
25
+ MatError ,
24
26
] ,
25
27
} )
26
28
export class DecimalComponent {
Original file line number Diff line number Diff line change 1
- import { CommonModule } from '@angular/common' ;
2
1
import { Component , computed , signal } from '@angular/core' ;
3
2
import { FormsModule } from '@angular/forms' ;
4
- import { MatFormFieldModule } from '@angular/material/form-field' ;
5
- import { MatInputModule } from '@angular/material/input' ;
6
- import { MatSelectModule } from '@angular/material/select' ;
3
+ import { MatFormField , MatLabel } from '@angular/material/form-field' ;
4
+ import { MatInput } from '@angular/material/input' ;
5
+ import { MatOption , MatSelect } from '@angular/material/select' ;
7
6
import {
8
7
IntlDurationPipe ,
9
8
IntlDurationPipeOptions ,
@@ -13,12 +12,13 @@ import { languages } from '../../languages';
13
12
@Component ( {
14
13
selector : 'app-duration' ,
15
14
imports : [
16
- CommonModule ,
17
- MatFormFieldModule ,
18
- MatSelectModule ,
19
15
IntlDurationPipe ,
20
16
FormsModule ,
21
- MatInputModule ,
17
+ MatFormField ,
18
+ MatInput ,
19
+ MatSelect ,
20
+ MatOption ,
21
+ MatLabel ,
22
22
] ,
23
23
templateUrl : './duration.component.html' ,
24
24
styleUrls : [ './duration.component.scss' ] ,
Original file line number Diff line number Diff line change 1
1
import { Component , computed , signal } from '@angular/core' ;
2
2
import { FormsModule } from '@angular/forms' ;
3
- import { MatOptionModule } from '@angular/material/core' ;
4
- import { MatFormFieldModule } from '@angular/material/form-field' ;
5
- import { MatSelectModule } from '@angular/material/select' ;
3
+ import { MatOption } from '@angular/material/core' ;
4
+ import { MatFormField , MatLabel } from '@angular/material/form-field' ;
5
+ import { MatSelect } from '@angular/material/select' ;
6
6
import {
7
7
IntlLanguagePipe ,
8
8
IntlLanguagePipeOptions ,
@@ -14,11 +14,12 @@ import { languages } from '../../languages';
14
14
templateUrl : './language.component.html' ,
15
15
styleUrls : [ './language.component.scss' ] ,
16
16
imports : [
17
- MatFormFieldModule ,
18
- MatSelectModule ,
19
17
FormsModule ,
20
- MatOptionModule ,
21
18
IntlLanguagePipe ,
19
+ MatFormField ,
20
+ MatSelect ,
21
+ MatOption ,
22
+ MatLabel ,
22
23
] ,
23
24
} )
24
25
export class LanguageComponent {
Original file line number Diff line number Diff line change 1
1
import { Component , computed , signal } from '@angular/core' ;
2
2
import { FormsModule } from '@angular/forms' ;
3
- import { MatOptionModule } from '@angular/material/core' ;
4
- import { MatFormFieldModule } from '@angular/material/form-field' ;
5
- import { MatSelectModule } from '@angular/material/select' ;
3
+ import { MatOption } from '@angular/material/core' ;
4
+ import { MatFormField , MatLabel } from '@angular/material/form-field' ;
5
+ import { MatSelect } from '@angular/material/select' ;
6
6
import { IntlListPipe , IntlListPipeOptions } from 'angular-ecmascript-intl' ;
7
7
import { languages } from '../../languages' ;
8
8
import { list } from './list' ;
@@ -12,11 +12,12 @@ import { list } from './list';
12
12
templateUrl : './list.component.html' ,
13
13
styleUrls : [ './list.component.scss' ] ,
14
14
imports : [
15
- MatFormFieldModule ,
16
- MatSelectModule ,
17
15
FormsModule ,
18
- MatOptionModule ,
19
16
IntlListPipe ,
17
+ MatFormField ,
18
+ MatSelect ,
19
+ MatOption ,
20
+ MatLabel ,
20
21
] ,
21
22
} )
22
23
export class ListComponent {
Original file line number Diff line number Diff line change 1
1
import { Component , computed , signal } from '@angular/core' ;
2
2
import { FormsModule } from '@angular/forms' ;
3
- import { MatOptionModule } from '@angular/material/core' ;
4
- import { MatFormFieldModule } from '@angular/material/form-field' ;
5
- import { MatInputModule } from '@angular/material/input' ;
6
- import { MatSelectModule } from '@angular/material/select' ;
3
+ import { MatOption } from '@angular/material/core' ;
4
+ import { MatError , MatFormField , MatLabel } from '@angular/material/form-field' ;
5
+ import { MatInput } from '@angular/material/input' ;
6
+ import { MatSelect } from '@angular/material/select' ;
7
7
import {
8
8
IntlPercentPipe ,
9
9
IntlPercentPipeOptions ,
@@ -15,12 +15,14 @@ import { languages } from '../../languages';
15
15
templateUrl : './percent.component.html' ,
16
16
styleUrls : [ './percent.component.scss' ] ,
17
17
imports : [
18
- MatFormFieldModule ,
19
- MatInputModule ,
20
18
FormsModule ,
21
- MatSelectModule ,
22
- MatOptionModule ,
23
19
IntlPercentPipe ,
20
+ MatFormField ,
21
+ MatInput ,
22
+ MatSelect ,
23
+ MatOption ,
24
+ MatLabel ,
25
+ MatError ,
24
26
] ,
25
27
} )
26
28
export class PercentComponent {
Original file line number Diff line number Diff line change 5
5
mat-tab-link
6
6
routerLink ="date "
7
7
routerLinkActive
8
- > Date</ a
9
8
>
9
+ Date
10
+ </ a >
10
11
< a
11
12
#decimalActive ="routerLinkActive "
12
13
[active] ="decimalActive.isActive "
13
14
mat-tab-link
14
15
routerLink ="decimal "
15
16
routerLinkActive
16
- > Decimal</ a
17
17
>
18
+ Decimal
19
+ </ a >
18
20
< a
19
21
#percentActive ="routerLinkActive "
20
22
[active] ="percentActive.isActive "
21
23
mat-tab-link
22
24
routerLink ="percent "
23
25
routerLinkActive
24
- > Percent</ a
25
26
>
27
+ Percent
28
+ </ a >
26
29
< a
27
30
#currencyActive ="routerLinkActive "
28
31
[active] ="currencyActive.isActive "
37
40
mat-tab-link
38
41
routerLink ="unit "
39
42
routerLinkActive
40
- > Unit</ a
41
43
>
44
+ Unit
45
+ </ a >
42
46
< a
43
47
#languageActive ="routerLinkActive "
44
48
[active] ="languageActive.isActive "
53
57
mat-tab-link
54
58
routerLink ="country "
55
59
routerLinkActive
56
- > Country</ a
57
60
>
61
+ Country
62
+ </ a >
58
63
< a
59
64
#listActive ="routerLinkActive "
60
65
[active] ="listActive.isActive "
61
66
mat-tab-link
62
67
routerLink ="list "
63
68
routerLinkActive
64
- > List</ a
65
69
>
70
+ List
71
+ </ a >
66
72
< a
67
73
#relativeTimeActive ="routerLinkActive "
68
74
[active] ="relativeTimeActive.isActive "
77
83
mat-tab-link
78
84
routerLink ="duration "
79
85
routerLinkActive
80
- > Duration</ a
81
86
>
87
+ Duration
88
+ </ a >
82
89
</ nav >
83
- < mat-tab-nav-panel #tabPanel > </ mat-tab-nav-panel >
90
+ < mat-tab-nav-panel #tabPanel / >
84
91
85
92
< div class ="panel-container ">
86
93
< router-outlet />
You can’t perform that action at this time.
0 commit comments