Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- Component,
- OnInit,
- Output,
- EventEmitter,
- Input,
- OnChanges, SimpleChanges, SimpleChange } from '@angular/core';
- @Component( {
- selector: 'app-time-lapse-form',
- templateUrl: './time-lapse-form.component.html',
- styleUrls: ['./time-lapse-form.component.css']
- } )
- export class TimeLapseFormComponent implements OnInit, OnChanges {
- ...
- // Animation View Data
- @Input() frameStartTime: string;
- @Input() frameEndTime: string;
- private _frameStartTime: string;
- private _frameEndTime: string;
- ...
- ngOnChanges( changes: SimpleChanges ) {
- for (let propName in changes) {
- let chng = changes[propName];
- let cur = JSON.stringify(chng.currentValue);
- let prev = JSON.stringify(chng.previousValue);
- console.log(cur);
- }
- }
- ...
- }
- app-time-lapse-form *ngIf="currentView == 'timeLapse'"
- (timeLapseData)="showTimeLapse($event)"
- [frameStartTime]="currentFrameStart"
- [frameEndTime]="currentFrameEnd"
- app-time-lapse-form
- export class MapAppComponent implements OnInit, OnDestroy {
- ...
- currentFrameStart = null;
- currentFrameEnd = null;
- ...
- animateFrame() {
- // Code that changes values here
- }
Add Comment
Please, Sign In to add comment