While I am trying to do build --prod
from my page I was getting few error this error where bit confusing.
For example:
Property 'selectedSize' is private and only accessible within class 'EditorComponent'.
<select id="dimension-preset" class="form-control" [(ngModel)]="selectedSize">
Property 'size' is private and only accessible within class 'EditorComponent'.
<input type="number" class="form-control" [(ngModel)]="size.width" (keyup)="changeSize()"/>
How can I solve this?
This is my html:
<select id="dimension-preset" class="form-control" [(ngModel)]="selectedSize"
(ngModelChange)="changeToPreset($event)">
<option value="null">Requirements</option>
<option *ngFor="let s of sizes" [ngValue]="s">{{s.width}}x{{s.height}}</option>
</select>
This is my html for size
<input type="number" class="form-control" [(ngModel)]="size.width" (keyup)="changeSize()"/>
<span class="input-group-addon" id="sizing-addon1"><i class="fa fa-arrows-h" aria-hidden="true"></i></span>
This is my TS:
private selectedSize: any = null;
private size: any = {
width: 1024,
height: 768
};
you have two ways to fix
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.