Posted 14 September 2017, 11:44 am EST
I have the following code that runs a function whenever the user changes the value of the
wj-input-time:
import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: '<wj-input-time [step]="1" (valueChanged)="test()"></wj-input-time>' }) export class AppComponent { test() { console.log('test'); } }
The above works fine but when I add data binding to the input the
valueChanged event is fired when the app loads and also when the user simply clicks the input which is not the desired outcome:
import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: '<wj-input-time [(value)]="testDate" [step]="1" (valueChanged)="test()"></wj-input-time>' }) export class AppComponent { testDate: Date = new Date(); test() { console.log('test'); } }
I have spent a lot of time reading Wijmo’s documentation but it was not helpful. What am I missing or doing wrong?
I’m using Angular 2 final and Wijmo 5.20162.211 eval

