Skip to content

Commit c4cac12

Browse files
committed
Testing + Basic Bugs Resolved
1 parent 85eeffb commit c4cac12

7 files changed

+11
-8
lines changed

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@
9797
"protractor": "~7.0.0",
9898
"rimraf": "2.6.2",
9999
"rxjs": "^6.6.7",
100+
"rxjs-tslint-rules": "4.34.8",
100101
"shelljs": "0.7.8",
101102
"systemjs-builder": "0.16.12",
102103
"ts-node": "3.3.0",
103104
"tslint": "~6.1.0",
105+
"tslint-config-valorsoft": "2.1.1",
104106
"typescript": "^4.9.5",
105107
"uuid": "3.1.0",
106108
"webpack": "3.8.1",

src/demo/app/app.component.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export class AppComponent implements OnInit {
274274
]
275275
};
276276

277-
@ViewChild('treeFonts', { static: true })
277+
@ViewChild('treeFonts', { static: false })
278278
public treeFonts;
279279

280280
public pls: TreeModel;
@@ -504,7 +504,7 @@ export class AppComponent implements OnInit {
504504
};
505505
private lastFFSNodeId = 86;
506506

507-
@ViewChild('treeFFS', { static: true })
507+
@ViewChild('treeFFS', { static: false })
508508
public treeFFS;
509509

510510
public icons: TreeModel = {
@@ -611,7 +611,7 @@ export class AppComponent implements OnInit {
611611
AppComponent.logEvent(e, 'Created');
612612
}
613613

614-
public onNodeFFSCreated(e: NodeEvent, controller): void {
614+
public onNodeFFSCreated(e: NodeEvent, controller?): void {
615615
AppComponent.logEvent(e, 'Created');
616616
if (controller) {
617617
controller.changeNodeId(++this.lastFFSNodeId);

src/demo/polyfills.ts

+1
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ import 'zone.js'; // Included with Angular CLI.
4949
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
5050
*/
5151
// import 'intl'; // Run `npm install --save intl`.
52+
(window as any).global = window;

src/menu/node-menu.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class NodeMenuComponent implements OnInit, OnDestroy {
2323

2424
@Input() public menuItems: NodeMenuItem[];
2525

26-
@ViewChild('menuContainer', { static: true })
26+
@ViewChild('menuContainer', { static: false })
2727
public menuContainer: any;
2828

2929
public availableMenuItems: NodeMenuItem[] = [

src/tree-internal.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class TreeInternalComponent implements OnInit, OnChanges, OnDestroy, Afte
9999
public isReadOnly = false;
100100
public controller: TreeController;
101101

102-
@ViewChild('checkbox', { static: true })
102+
@ViewChild('checkbox', { static: false })
103103
public checkboxElementRef: ElementRef;
104104

105105
private subscriptions: Subscription[] = [];

src/tree.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ export class TreeComponent implements OnInit, OnChanges, OnDestroy {
6161

6262
public tree: Tree;
6363

64-
@ViewChild('rootComponent', { static: true })
64+
@ViewChild('rootComponent', { static: false })
6565
public rootComponent;
6666

67-
@ContentChild(TemplateRef, { static: true })
67+
@ContentChild(TemplateRef, { static: false })
6868
public template;
6969

7070
private subscriptions: Subscription[] = [];

test/tree-controller.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class TestComponent {
5555
public settings = new Ng2TreeSettings();
5656
public treeLord: TreeModel = treeLord;
5757

58-
@ViewChild('lordTreeInstance', { static: true })
58+
@ViewChild('lordTreeInstance', { static: false })
5959
public lordTreeComponent;
6060

6161
public constructor(public treeHolder: ElementRef) {

0 commit comments

Comments
 (0)