Angular
Angular Service
- An angular service can be provided in a module definition. It can also be provided using a decorator
Using a decorator has the advantage of being tree shakable.@Injectable({ providedIn: 'root', })
- List of built in services
Example of listening to custom event:
@HostListener('hide.bs.modal')
modalClosing() {
...
}
Adding Bootstrap.js to angular
Angular schematics can upgrade your code to a major version
Programmatically setting selected option:
<select [formControl]='selectControl'>
<option [ngValue]=null>Select An Option</option>
<option *ngFor="let f of comms" [value]="f.GUID">{{f.Name}}</option>
</select>
Then in the component
selectControl: FormControl = new FormControl();
.....
this.selectControl.setValue('84584');
Comments
Post a Comment