Skip to content

Commit

Permalink
feat(abc:let): will be removed in v19
Browse files Browse the repository at this point in the history
- Please use `@let` instead
cipchk committed Jul 5, 2024

Verified

This commit was signed with the committer’s verified signature.
ocelotl Diego Hurtado
1 parent 23ae7ef commit 9419e3c
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/abc/let/index.en-US.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ title: let
subtitle: Let
cols: 1
module: import { LetModule } from '@delon/abc/let';
deprecated: 19.0.0
---

Allows to reuse computed value in several places in template to avoid recalculations of getters or many `async` pipes.
1 change: 1 addition & 0 deletions packages/abc/let/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ title: let
subtitle: 定义
cols: 1
module: import { LetModule } from '@delon/abc/let';
deprecated: 19.0.0
---

允许在模板内复用计算值(包含异步),避免重复重新计算。
3 changes: 3 additions & 0 deletions packages/abc/let/let.directive.ts
Original file line number Diff line number Diff line change
@@ -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;
3 changes: 3 additions & 0 deletions packages/abc/let/let.module.ts
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@ import { LetDirective } from './let.directive';

const DIRECTIVES = [LetDirective];

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

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

0 comments on commit 9419e3c

Please sign in to comment.