knockout.js - How to subscribe to changes Knockout Observable in TypeScript? -


how subscribe changes knockout observable in typescript?

data :knockoutobservable<string> = ko.observable<string>(); 

i need like:

data.subscribe(function(e){})?? 

type script way write javascript. not make difference knockout.

so, can write subscribe in following manner (same in javascript)

data.subscribe(function(newvalue) {     alert(newvalue); }); 

Comments

Popular posts from this blog

c# - ItextSharp font color issue in ver 5.5.4+ -

jquery - Multiple issues with pushstate: history, loading, calling functions -

ios - retrievePeripherals deprecated in IOS7 how to substitude it with retrievePeripheralsWithIdentifiers -