Skip to content

Commit 7a7eaa5

Browse files
update Angular template syntax
1 parent a5192b1 commit 7a7eaa5

File tree

9 files changed

+38
-21
lines changed

9 files changed

+38
-21
lines changed
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<ng-container *ngIf="isAuthenticated(); else unauthenticated">
1+
@if (isAuthenticated()) {
2+
<ng-container>
23
<app-<%= layout %> title="{{appInfo.title}}">
34
<router-outlet></router-outlet>
45
<app-footer>
@@ -8,7 +9,8 @@
89
</app-footer>
910
</app-<%= layout %>>
1011
</ng-container>
11-
12-
<ng-template #unauthenticated>
12+
} @else {
13+
<ng-template>
1314
<app-unauthenticated-content></app-unauthenticated-content>
1415
</ng-template>
16+
}

packages/devextreme-schematics/src/add-layout/files/src/app/layouts/side-nav-inner-toolbar/side-nav-inner-toolbar.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
<app-side-navigation-menu
1212
[compactMode]="!menuOpened"
1313
[selectedItem]="selectedRoute"
14-
[ngClass]="swatchClassName"
14+
[class]="swatchClassName"
1515
*dxTemplate="let dataMenu of 'panel'"
1616
(selectedItemChanged)="navigationChanged($event)"
1717
(openMenu)="navigationClick()">
1818
<dx-toolbar id="navigation-header">
19+
@if (minMenuSize !== 0) {
1920
<dxi-toolbar-item
20-
*ngIf="minMenuSize !== 0"
2121
location="before"
2222
cssClass="menu-button"
2323
widget="dxButton"
@@ -27,6 +27,7 @@
2727
onClick: toggleMenu
2828
}">
2929
</dxi-toolbar-item>
30+
}
3031
<dxi-toolbar-item
3132
location="before"
3233
cssClass="header-title"

packages/devextreme-schematics/src/add-layout/files/src/app/layouts/side-nav-outer-toolbar/side-nav-outer-toolbar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<app-side-navigation-menu
1919
[compactMode]="!menuOpened"
2020
[selectedItem]="selectedRoute"
21-
[ngClass]="swatchClassName"
21+
[class]="swatchClassName"
2222
*dxTemplate="let dataMenu of 'panel'"
2323
(selectedItemChanged)="navigationChanged($event)"
2424
(openMenu)="navigationClick()">

packages/devextreme-schematics/src/add-layout/files/src/app/shared/components/change-password-form/change-password-form.component.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@
2323
<ng-container *dxTemplate="let item of 'changePasswordTemplate'">
2424
<div>
2525
<span class="dx-button-text">
26-
<ng-container *ngIf="loading; else notLoading">
26+
@if (loading) {
27+
<ng-container>
2728
<dx-load-indicator width="24px" height="24px" [visible]="true"></dx-load-indicator>
2829
</ng-container>
29-
<ng-template #notLoading>Continue</ng-template>
30+
} @else {
31+
<ng-template>Continue</ng-template>
32+
}
3033
</span>
3134
</div>
3235
</ng-container>

packages/devextreme-schematics/src/add-layout/files/src/app/shared/components/create-account-form/create-account-form.component.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@
3737
<ng-container *dxTemplate="let item of 'createAccountTemplate'">
3838
<div>
3939
<span class="dx-button-text">
40-
<ng-container *ngIf="loading; else notLoading">
40+
@if (loading) {
41+
<ng-container>
4142
<dx-load-indicator width="24px" height="24px" [visible]="true"></dx-load-indicator>
4243
</ng-container>
43-
44-
<ng-template #notLoading>Create a new account</ng-template>
44+
} @else {
45+
<ng-template>Create a new account</ng-template>
46+
}
4547
</span>
4648
</div>
4749
</ng-container>

packages/devextreme-schematics/src/add-layout/files/src/app/shared/components/header/header.component.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<header>
22
<dx-toolbar class="header-toolbar">
3+
@if (menuToggleEnabled) {
34
<dxi-toolbar-item
4-
*ngIf="menuToggleEnabled"
55
location="before"
66
widget="dxButton"
77
cssClass="menu-button"
@@ -11,18 +11,20 @@
1111
onClick: toggleMenu
1212
}">
1313
</dxi-toolbar-item>
14+
}
15+
@if (title) {
1416
<dxi-toolbar-item
1517
location="before"
1618
cssClass="header-title"
17-
*ngIf="title"
1819
[text]="title">
1920
</dxi-toolbar-item>
21+
}
2022
<dxi-toolbar-item
2123
location="after"
2224
>
23-
<ng-container *dxTemplate>
25+
<div *dxTemplate>
2426
<theme-switcher></theme-switcher>
25-
</ng-container>
27+
</div>
2628
</dxi-toolbar-item>
2729
<dxi-toolbar-item
2830
location="after"

packages/devextreme-schematics/src/add-layout/files/src/app/shared/components/login-form/login-form.component.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@
2727
<ng-container *dxTemplate="let item of 'signInTemplate'">
2828
<div>
2929
<span class="dx-button-text">
30-
<ng-container *ngIf="loading; else notLoading">
30+
@if (loading) {
31+
<ng-container>
3132
<dx-load-indicator width="24px" height="24px" [visible]="true"></dx-load-indicator>
3233
</ng-container>
33-
<ng-template #notLoading>Sign In</ng-template>
34+
} @else {
35+
<ng-template>Sign In</ng-template>
36+
}
3437
</span>
3538
</div>
3639
</ng-container>

packages/devextreme-schematics/src/add-layout/files/src/app/shared/components/reset-password-form/reset-password-form.component.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
<ng-container *dxTemplate="let item of 'resetPasswordTemplate'">
1818
<div>
1919
<span class="dx-button-text">
20-
<ng-container *ngIf="loading; else notLoading">
20+
@if (loading) {
21+
<ng-container>
2122
<dx-load-indicator width="24px" height="24px" [visible]="true"></dx-load-indicator>
2223
</ng-container>
23-
<ng-template #notLoading>Reset my password</ng-template>
24+
} @else {
25+
<ng-template>Reset my password</ng-template>
26+
}
2427
</span>
2528
</div>>
2629
</ng-container>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="user-panel">
2+
@if (menuMode !== 'list') {
23
<dx-drop-down-button
3-
*ngIf="menuMode !== 'list'"
44
stylingMode="text"
55
[icon]="'https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/06.png'"
66
[showArrowIcon]="false"
@@ -10,11 +10,12 @@
1010
[elementAttr]="{class: 'user-button'}"
1111
[dropDownOptions]="{width: '150px'}">
1212
</dx-drop-down-button>
13+
} @else {
1314
<dx-list
14-
*ngIf="menuMode === 'list'"
1515
displayExpr="text"
1616
keyExpr="id"
1717
width="130"
1818
[items]="menuItems">
1919
</dx-list>
20+
}
2021
</div>

0 commit comments

Comments
 (0)