Skip to content

Commit 4a4c9ed

Browse files
committed
frontend CHANGE components' members visibility in templates
In Angular5 the private components members are not visible in their templates so all such members must be now changed to public.
1 parent 5a93f9d commit 4a4c9ed

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

frontend/config/config.component.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export class ConfigComponent implements OnInit {
1919
err_msg = "";
2020
commit_error = [];
2121

22-
constructor(private sessionsService: SessionsService,
23-
private modsService: ModificationsService,
24-
private treeService: TreeService,
22+
constructor(public sessionsService: SessionsService,
23+
public modsService: ModificationsService,
24+
public treeService: TreeService,
2525
private router: Router) {}
2626

2727
addSession() {

frontend/config/tree.component.ts

+17-18
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class TreeCreate {
5252
@Input() indentation;
5353
@Input() activeSession: Session;
5454

55-
constructor(private modsService: ModificationsService, private sessionsService: SessionsService) {}
55+
constructor(public modsService: ModificationsService, public sessionsService: SessionsService) {}
5656

5757
closeCreatingDialog(node, abort:boolean = true) {
5858
this.modsService.createClose(this.activeSession, node, abort);
@@ -77,9 +77,9 @@ export class TreeEdit {
7777
@Input() indentation;
7878
@Input() activeSession: Session;
7979

80-
constructor(private treeService: TreeService,
81-
private modsService: ModificationsService,
82-
private sessionsService: SessionsService) {}
80+
constructor(public treeService: TreeService,
81+
public modsService: ModificationsService,
82+
public sessionsService: SessionsService) {}
8383

8484
changeValueCancel(node) {
8585
if ('value' in node) {
@@ -165,15 +165,14 @@ export class TreeEdit {
165165
})
166166
export class TreeIndent implements OnInit {
167167
@Input() node;
168-
@Input() value;
169168
@Input() indentation;
170169
@Input() type;
171170
activeSession: Session;
172171
private timeout;
173172

174-
constructor(private treeService: TreeService,
175-
private modsService: ModificationsService,
176-
private sessionsService: SessionsService) {}
173+
constructor(public treeService: TreeService,
174+
public modsService: ModificationsService,
175+
public sessionsService: SessionsService) {}
177176

178177
ngOnInit(): void {
179178
this.activeSession = this.sessionsService.getSession();
@@ -265,7 +264,7 @@ export class TreeIndent implements OnInit {
265264
selector: 'tree-leaflist-value',
266265
template: `
267266
<div class="node yang-leaflist-value" [class.dirty]="node['dirty']" [class.deleted]="modsService.isDeleted(node, true)">
268-
<tree-indent [node]="node" [indentation]="treeService.inheritIndentation(indentation, node)" [type]="'value'" [value]="value"></tree-indent>
267+
<tree-indent [node]="node" [indentation]="treeService.inheritIndentation(indentation, node)" [type]="'value'"></tree-indent>
269268
<div class="value_standalone">{{node['value']}}</div>
270269
</div>
271270
<tree-edit *ngIf="node['edit']" [node]="node" [indentation]="indentation" [activeSession]="activeSession"></tree-edit>`,
@@ -277,8 +276,8 @@ export class TreeLeaflistValue {
277276
@Input() activeSession: Session;
278277
@Input() indentation;
279278

280-
constructor(private modsService: ModificationsService,
281-
private treeService: TreeService) {}
279+
constructor(public modsService: ModificationsService,
280+
public treeService: TreeService) {}
282281
}
283282

284283
@Component({
@@ -292,10 +291,10 @@ export class TreeNode {
292291
@Input() indentation;
293292
@Input() activeSession: Session;
294293

295-
constructor(private modsService: ModificationsService,
296-
private sessionsService: SessionsService,
297-
private treeService: TreeService,
298-
private schemasService: SchemasService,
294+
constructor(public modsService: ModificationsService,
295+
public sessionsService: SessionsService,
296+
public treeService: TreeService,
297+
public schemasService: SchemasService,
299298
private changeDetector: ChangeDetectorRef,
300299
private router: Router) {}
301300

@@ -371,9 +370,9 @@ export class TreeView implements OnInit {
371370
@Input() indentation;
372371
activeSession: Session;
373372

374-
constructor(private modsService: ModificationsService,
375-
private sessionsService: SessionsService,
376-
private treeService: TreeService) {}
373+
constructor(public modsService: ModificationsService,
374+
public sessionsService: SessionsService,
375+
public treeService: TreeService) {}
377376

378377
ngOnInit(): void {
379378
this.activeSession = this.sessionsService.getSession();

frontend/yang/yang.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export class YANGComponent {
1414
title = 'YANG Explorer';
1515
test = null;
1616

17-
constructor( private schemasService: SchemasService,
18-
private router: Router ) { }
17+
constructor(public schemasService: SchemasService, private router: Router ) { }
1918

2019
addSchema() {
2120
this.router.navigateByUrl( '/netopeer/inventory/schemas' );

0 commit comments

Comments
 (0)