Skip to content

Commit

Permalink
refactor(module:back-top): migrate demo to standalone mode (#8735)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laffery authored Sep 10, 2024
1 parent 1d4fa69 commit c64e1a1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions components/back-top/demo/basic.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { Component } from '@angular/core';

import { NzBackTopModule } from 'ng-zorro-antd/back-top';

@Component({
standalone: true,
selector: 'nz-demo-back-top-basic',
imports: [NzBackTopModule],
template: `
<nz-back-top></nz-back-top>
Scroll down to see the bottom-right
Expand Down
6 changes: 5 additions & 1 deletion components/back-top/demo/custom.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { Component } from '@angular/core';

import { NzBackTopModule } from 'ng-zorro-antd/back-top';

@Component({
standalone: true,
selector: 'nz-demo-back-top-custom',
imports: [NzBackTopModule],
template: `
<nz-back-top [nzTemplate]="tpl" [nzVisibilityHeight]="100" (nzOnClick)="notify()">
<nz-back-top [nzTemplate]="tpl" [nzVisibilityHeight]="100" (nzClick)="notify()">
<ng-template #tpl>
<div class="ant-back-top-inner">UP</div>
</ng-template>
Expand Down
3 changes: 0 additions & 3 deletions components/back-top/demo/module

This file was deleted.

4 changes: 4 additions & 0 deletions components/back-top/demo/target.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { Component } from '@angular/core';

import { NzBackTopModule } from 'ng-zorro-antd/back-top';

@Component({
standalone: true,
selector: 'nz-demo-back-top-target',
imports: [NzBackTopModule],
template: `
Scroll down to see the bottom-right
<strong>gray</strong>
Expand Down

0 comments on commit c64e1a1

Please sign in to comment.