If it is possible...
I have a site: www.recognitiongame.com I have started to use Angular2 Material Components ( Autocomplete, Button... ).
I want to change the "Main theme:" DropDownlist to Angular2 Material Select Component.
I have this:
<mat-select placeholder="Main theme:" [(ngModel)]="selectedValue">
<mat-option *ngFor="let maintheme of mainthemes" [value]="maintheme.id">
{{ maintheme.value }}
</mat-option>
How can I access the Angular2 Component "selectedValue" variable from outside? Something like this:
<html>
<body>
<my-app></my-app>
...
<script type="text/javascript">
**Change the selectedValue?**
</script>
</body>
</html>
public _selectedValue = window['selectedValue']
public set selectedValue(_selectedValue){
this._selectedValue = _selectedValue;
window['selectedValue'] = _selectedValue;
}
public get selectedValue(){
return this._selectedValue;
}
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.