valor-software/angular2-bootstrap

View on GitHub
demo/src/app/components/+progressbar/demos/config/config.ts

Summary

Maintainability
A
35 mins
Test Coverage
import { Component } from '@angular/core';
import { ProgressbarConfig } from 'ngx-bootstrap/progressbar';

// such override allows to keep some initial values

export function getProgressbarConfig(): ProgressbarConfig {
  return Object.assign(new ProgressbarConfig(), { animate: true, striped: true,  max: 150 });
}

@Component({
  selector: 'demo-progressbar-config',
  templateUrl: './config.html',
  providers: [{ provide: ProgressbarConfig, useFactory: getProgressbarConfig }]
})
export class DemoProgressbarConfigComponent {}