-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(module:time-picker,timeline): migrate demo to standalone mode (
#8815) * refactor(module:time-picker): migrate demo to standalone mode * refactor(module:timeline): migrate demo to standalone mode
- Loading branch information
Showing
26 changed files
with
226 additions
and
220 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-time-picker-bordered', | ||
template: ` <nz-time-picker nzBorderless></nz-time-picker> `, | ||
styles: [] | ||
standalone: true, | ||
imports: [NzTimePickerModule], | ||
template: `<nz-time-picker nzBorderless></nz-time-picker>` | ||
}) | ||
export class NzDemoTimePickerBorderedComponent {} |
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
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-time-picker-disabled', | ||
template: ` <nz-time-picker nzDisabled></nz-time-picker> ` | ||
standalone: true, | ||
imports: [NzTimePickerModule], | ||
template: `<nz-time-picker nzDisabled></nz-time-picker>` | ||
}) | ||
export class NzDemoTimePickerDisabledComponent {} |
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
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-time-picker-interval-options', | ||
template: ` <nz-time-picker [nzMinuteStep]="15" [nzSecondStep]="10"></nz-time-picker> ` | ||
standalone: true, | ||
imports: [NzTimePickerModule], | ||
template: `<nz-time-picker [nzMinuteStep]="15" [nzSecondStep]="10"></nz-time-picker>` | ||
}) | ||
export class NzDemoTimePickerIntervalOptionsComponent {} |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-time-picker-status', | ||
standalone: true, | ||
imports: [NzTimePickerModule], | ||
template: ` | ||
<nz-space nzDirection="vertical"> | ||
<nz-time-picker *nzSpaceItem nzStatus="error"></nz-time-picker> | ||
<nz-time-picker *nzSpaceItem nzStatus="warning">></nz-time-picker> | ||
</nz-space> | ||
<nz-time-picker nzStatus="error"></nz-time-picker> | ||
<br /> | ||
<br /> | ||
<nz-time-picker nzStatus="warning">></nz-time-picker> | ||
` | ||
}) | ||
export class NzDemoTimePickerStatusComponent {} |
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 |
---|---|---|
@@ -1,28 +1,19 @@ | ||
import { Component } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
|
||
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-time-picker-use12-hours', | ||
standalone: true, | ||
imports: [FormsModule, NzTimePickerModule], | ||
template: ` | ||
<nz-time-picker [(ngModel)]="time" [nzUse12Hours]="true" (ngModelChange)="log($event)"></nz-time-picker> | ||
<nz-time-picker | ||
[(ngModel)]="time" | ||
[nzUse12Hours]="true" | ||
(ngModelChange)="log($event)" | ||
nzFormat="h:mm a" | ||
></nz-time-picker> | ||
`, | ||
styles: [ | ||
` | ||
nz-time-picker { | ||
margin: 0 8px 12px 0; | ||
} | ||
` | ||
] | ||
<nz-time-picker [(ngModel)]="time" nzUse12Hours></nz-time-picker> | ||
<br /> | ||
<br /> | ||
<nz-time-picker [(ngModel)]="time" nzUse12Hours nzFormat="h:mm a"></nz-time-picker> | ||
` | ||
}) | ||
export class NzDemoTimePickerUse12HoursComponent { | ||
time: Date | null = null; | ||
|
||
log(value: Date): void { | ||
console.log(value); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { Component } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
|
||
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-time-picker-value', | ||
template: ` <nz-time-picker [(ngModel)]="time" (ngModelChange)="log($event)"></nz-time-picker> ` | ||
standalone: true, | ||
imports: [FormsModule, NzTimePickerModule], | ||
template: `<nz-time-picker [(ngModel)]="time"></nz-time-picker>` | ||
}) | ||
export class NzDemoTimePickerValueComponent { | ||
time: Date | null = null; | ||
|
||
log(time: Date): void { | ||
console.log(time && time.toTimeString()); | ||
} | ||
} |
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
Oops, something went wrong.