Skip to content

Commit

Permalink
feat(abc:let): will be removed in v19 (#1814)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk authored Jul 19, 2024
1 parent bafe3ab commit 5dd82df
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/abc/let/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ title: let
subtitle: Let
cols: 1
module: import { LetModule } from '@delon/abc/let';
deprecated: 19.0.0
---

# Will be removed in v19, Please use `@let` instead.

Allows to reuse computed value in several places in template to avoid recalculations of getters or many `async` pipes.

```html
Expand Down
3 changes: 3 additions & 0 deletions packages/abc/let/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ title: let
subtitle: 定义
cols: 1
module: import { LetModule } from '@delon/abc/let';
deprecated: 19.0.0
---

# Will be removed in v19, Please use `@let` instead.

允许在模板内复用计算值(包含异步),避免重复重新计算。

```html
Expand Down
3 changes: 3 additions & 0 deletions packages/abc/let/let.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export class LetContext<T> {
}
}

/**
* @deprecated Will be removed in v19, Please use `@let` instead.
*/
@Directive({ selector: '[let]', standalone: true })
export class LetDirective<T> {
@Input({ required: true }) let!: T;
Expand Down
3 changes: 3 additions & 0 deletions packages/abc/let/let.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { LetDirective } from './let.directive';

const DIRECTIVES = [LetDirective];

Check warning on line 5 in packages/abc/let/let.module.ts

View workflow job for this annotation

GitHub Actions / lint

'LetDirective' is deprecated. Will be removed in v19, Please use `@let` instead

/**
* @deprecated Will be removed in v19, Please use `@let` instead.
*/
@NgModule({
imports: DIRECTIVES,
exports: DIRECTIVES
Expand Down

0 comments on commit 5dd82df

Please sign in to comment.