ng2-bootstrap-base-modified
Version:
Native Angular Bootstrap Components Typeahead modified
17 lines (13 loc) • 466 B
text/typescript
import { Component } from '@angular/core';
import { AlertConfig } from 'ng2-bootstrap/alert';
// such override allows to keep some initial values
export function getAlertConfig(): AlertConfig {
return Object.assign(new AlertConfig(), {type: 'success'});
}
@Component({
selector: 'demo-alert-config',
templateUrl: './config.html',
providers: [{provide: AlertConfig, useFactory: getAlertConfig}]
})
export class DemoAlertConfigComponent {
}