|
|
@ -159,6 +159,8 @@ export class MyPageRenderStrategy implements PageRenderStrategy { |
|
|
* an async service can be used within. |
|
|
* an async service can be used within. |
|
|
|
|
|
|
|
|
constructor(private service: SomeAsyncService) {} |
|
|
constructor(private service: SomeAsyncService) {} |
|
|
|
|
|
or |
|
|
|
|
|
service = inject(SomeAsyncService) |
|
|
|
|
|
|
|
|
shouldRender(type: string) { |
|
|
shouldRender(type: string) { |
|
|
return this.service.checkTypeAsync(type).pipe(map(val => val.isTrue())); |
|
|
return this.service.checkTypeAsync(type).pipe(map(val => val.isTrue())); |
|
|
|