Skip to content

Instantly share code, notes, and snippets.

@ByJC
Created February 1, 2017 11:04
Show Gist options
  • Save ByJC/789ad0c2864b80941ed36c6198db6ffa to your computer and use it in GitHub Desktop.
Save ByJC/789ad0c2864b80941ed36c6198db6ffa to your computer and use it in GitHub Desktop.
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { ProgressBarService } from './progressbar.service';
@Component({
selector: 'app-progressbar',
templateUrl: './progressbar.component.html',
styleUrls: ['./progressbar.component.scss'],
providers:[]
})
export class ProgressbarComponent implements OnInit {
isDisplay : boolean;
constructor(private $progressbar : ProgressBarService) { }
ngOnInit() {
this.$progressbar
.changes
.subscribe((display : boolean) => { this.isDisplay = display; });
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment