Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e5b1f5f

Browse files
committed
docs(template): change modules imports to standalone ones
1 parent c4a336f commit e5b1f5f

File tree

4 files changed

+21
-79
lines changed

4 files changed

+21
-79
lines changed

apps/docs/docs/template/api/let-directive.md

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -115,28 +115,14 @@ n/a
115115

116116
## Setup
117117

118-
The `LetModule` can be imported as following:
119-
120-
Module based setup:
121-
122-
```ts
123-
import { LetModule } from '@rx-angular/template/let';
124-
125-
@NgModule({
126-
imports: [LetModule],
127-
// ...
128-
})
129-
export class AnyModule {}
130-
```
131-
132-
Standalone component setup:
118+
The `LetDirective` can be imported as following:
133119

134120
```ts
135-
import { LetModule } from '@rx-angular/template/let';
121+
import { LetDirective } from '@rx-angular/template/let';
136122

137123
@Component({
138124
standalone: true,
139-
imports: [LetModule],
125+
imports: [LetDirective],
140126
template: `...`,
141127
})
142128
export class AnyComponent {}
@@ -237,7 +223,7 @@ e.g. from the complete template back to the value display
237223

238224
```typescript
239225
@Component({
240-
selector: 'any-component',
226+
selector: 'app-root',
241227
template: `
242228
<button (click)="nextTrigger$.next()">show value</button>
243229
<ng-container
@@ -263,7 +249,7 @@ e.g. from the complete template back to the value display
263249

264250
```typescript
265251
@Component({
266-
selector: 'any-component',
252+
selector: 'app-root',
267253
template: `
268254
<ng-container *rxLet="num$; let n; error: error; errorTrg: errorTrigger$">
269255
{{ n }}
@@ -286,7 +272,7 @@ e.g. from the complete template back to the value display
286272

287273
```typescript
288274
@Component({
289-
selector: 'any-component',
275+
selector: 'app-root',
290276
template: `
291277
<ng-container
292278
*rxLet="num$; let n; complete: complete; completeTrg: completeTrigger$"
@@ -311,7 +297,7 @@ e.g. from the complete template back to the value display
311297

312298
```typescript
313299
@Component({
314-
selector: 'any-component',
300+
selector: 'app-root',
315301
template: `
316302
<input (input)="search($event.target.value)" />
317303
<ng-container
@@ -348,7 +334,7 @@ in a convenient way.
348334

349335
```typescript
350336
@Component({
351-
selector: 'any-component',
337+
selector: 'app-root',
352338
template: `
353339
<input (input)="search($event.target.value)" />
354340
<ng-container

apps/docs/docs/template/api/rx-for-directive.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -107,28 +107,14 @@ The following context variables are available for each template:
107107

108108
## Setup
109109

110-
The `ForModule` can be imported as following:
111-
112-
Module based setup:
113-
114-
```
115-
import { ForModule } from "@rx-angular/template/for";
116-
117-
@NgModule({
118-
imports: [ForModule],
119-
// ...
120-
})
121-
export class AnyModule {}
122-
```
123-
124-
Standalone component setup:
110+
The `RxFor` can be imported as following:
125111

126112
```
127-
import { ForModule } from "@rx-angular/template/for";
113+
import { RxFor } from "@rx-angular/template/for";
128114
129115
@Component({
130116
standalone: true,
131-
imports: [ForModule],
117+
imports: [RxFor],
132118
template: `...`
133119
})
134120
export class AnyComponent {}

apps/docs/docs/template/api/rx-if-directive.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -103,28 +103,14 @@ n/a
103103

104104
## Setup
105105

106-
The `IfModule` can be imported as following:
107-
108-
Module based setup:
109-
110-
```ts
111-
import { IfModule } from '@rx-angular/template/if';
112-
113-
@NgModule({
114-
imports: [IfModule],
115-
// ...
116-
})
117-
export class AnyModule {}
118-
```
119-
120-
Standalone component setup:
106+
The `RxIf` can be imported as following:
121107

122108
```ts
123-
import { IfModule } from '@rx-angular/template/if';
109+
import { RxIf } from '@rx-angular/template/if';
124110

125111
@Component({
126112
standalone: true,
127-
imports: [IfModule],
113+
imports: [RxIf],
128114
template: `...`,
129115
})
130116
export class AnyComponent {}

libs/template/README.md

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,34 +70,18 @@ nx migrate @rx-angular/template
7070

7171
## Basic setup
7272

73-
You can import each feature module individually.
74-
75-
Module based setup:
76-
77-
```typescript
78-
import { LetModule } from '@rx-angular/template/let';
79-
import { ForModule } from '@rx-angular/template/for';
80-
import { PushModule } from '@rx-angular/template/push';
81-
import { UnpatchModule } from '@rx-angular/template/unpatch';
82-
83-
@NgModule({
84-
declarations: [...],
85-
imports: [ForModule, LetModule, PushModule, UnpatchModule],
86-
})
87-
export class AnyModule {}
88-
```
89-
90-
Standalone component setup:
73+
You can import each feature individually.
9174

9275
```typescript
93-
import { LetModule } from '@rx-angular/template/let';
94-
import { ForModule } from '@rx-angular/template/for';
95-
import { PushModule } from '@rx-angular/template/push';
96-
import { UnpatchModule } from '@rx-angular/template/unpatch';
76+
import { LetDirective } from '@rx-angular/template/let';
77+
import { RxFor } from '@rx-angular/template/for';
78+
import { RxIf } from '@rx-angular/template/if';
79+
import { PushPipe } from '@rx-angular/template/push';
80+
import { UnpatchDirective } from '@rx-angular/template/unpatch';
9781

9882
@Component({
9983
standalone: true,
100-
imports: [ForModule, LetModule, PushModule, UnpatchModule],
84+
imports: [LetDirective, RxFor, RxIf, PushPipe, UnpatchDirective],
10185
template: `...`,
10286
})
10387
export class AnyComponent {}

0 commit comments

Comments
 (0)