@ng-doc/builder 16.11.0 → 16.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ng-doc/builder",
3
- "version": "16.11.0",
3
+ "version": "16.11.1",
4
4
  "type": "commonjs",
5
5
  "builders": "./builders.json",
6
6
  "schematics": "./schematics/collection.json",
7
7
  "dependencies": {
8
- "@ng-doc/core": "16.11.0",
9
- "@ng-doc/utils": "16.11.0",
8
+ "@ng-doc/core": "16.11.1",
9
+ "@ng-doc/utils": "16.11.1",
10
10
  "@angular-devkit/architect": ">=0.1600.0",
11
11
  "@angular-devkit/build-angular": ">=16.0.0",
12
12
  "chokidar": "3.5.3",
@@ -1,20 +1,9 @@
1
1
  // @ts-nocheck
2
- import {
3
- ChangeDetectionStrategy,
4
- Component, inject,
5
- InjectionToken,
6
- NgModule,
7
- Type,
8
- ViewChild,
9
- ViewContainerRef
10
- } from '@angular/core';
2
+ import {ChangeDetectionStrategy, Component, NgModule, Type, ViewChild, ViewContainerRef} from '@angular/core';
11
3
  import {NgDocBasePlayground, providePlaygroundDemo} from '@ng-doc/app';
12
4
  // noinspection ES6UnusedImports
13
5
  import pageEntity from '{{ targetImportPath }}';
14
6
  import {CommonModule} from '@angular/common';
15
- import {Constructor} from '@ng-doc/core';
16
-
17
- const PLAYGROUND_COMPONENT = new InjectionToken<Type<any>>('PLAYGROUND_COMPONENT')
18
7
 
19
8
  {%- set components = [] %}
20
9
  {%- set index = 1 %}
@@ -42,22 +31,21 @@ const PLAYGROUND_COMPONENT = new InjectionToken<Type<any>>('PLAYGROUND_COMPONENT
42
31
  pageEntity.playgrounds['{{ id }}'].target,
43
32
  {%- endif %}
44
33
  ],
45
- providers: [{
46
- provide: PLAYGROUND_COMPONENT,
47
- useClass: pageEntity.playgrounds['{{ id }}'].target,
48
- }],
49
34
  changeDetection: ChangeDetectionStrategy.OnPush,
50
35
  })
51
36
  export class {{ comp.name }} extends NgDocBasePlayground {
52
37
  static readonly selector: string = '{{ comp.selector }}';
53
38
 
39
+ @ViewChild(pageEntity.playgrounds['{{ id }}'].target, {static: true})
40
+ readonly playground: Type<any>;
41
+
54
42
  @ViewChild(pageEntity.playgrounds['{{ id }}'].target, {static: true, read: ViewContainerRef})
55
43
  readonly viewContainerRef: ViewContainerRef;
56
44
 
57
45
  readonly configData: any = pageEntity.playgrounds['{{ id }}'].data;
58
46
 
59
47
  constructor() {
60
- super(inject(PLAYGROUND_COMPONENT), pageEntity.playgrounds['{{ id }}'].target);
48
+ super(pageEntity.playgrounds['{{ id }}'].target);
61
49
  }
62
50
  }
63
51
  {%- set index = index + 1 -%}