mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
30 lines
762 B
TypeScript
30 lines
762 B
TypeScript
import {bootstrap, Component, View, ViewEncapsulation} from 'angular2/bootstrap';
|
|
import {MdProgressLinear} from 'angular2_material/src/components/progress-linear/progress_linear';
|
|
import {UrlResolver} from 'angular2/src/services/url_resolver';
|
|
import {commonDemoSetup, DemoUrlResolver} from '../demo_common';
|
|
import {bind} from 'angular2/di';
|
|
|
|
@Component({
|
|
selector: 'demo-app',
|
|
})
|
|
@View({
|
|
templateUrl: './demo_app.html',
|
|
directives: [MdProgressLinear],
|
|
encapsulation: ViewEncapsulation.NONE,
|
|
})
|
|
class DemoApp {
|
|
progress: number;
|
|
|
|
constructor() {
|
|
this.progress = 40;
|
|
}
|
|
|
|
step(s: number) {
|
|
this.progress += s;
|
|
}
|
|
}
|
|
|
|
export function main() {
|
|
commonDemoSetup();
|
|
bootstrap(DemoApp, [bind(UrlResolver).toValue(new DemoUrlResolver())]);
|
|
}
|