Skip to content

Instantly share code, notes, and snippets.

@mbejda
Created November 10, 2013 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbejda/7391826 to your computer and use it in GitHub Desktop.
Save mbejda/7391826 to your computer and use it in GitHub Desktop.
<% layout('../../../layout/dashboard.ejs') %>
<div data-bind="page: {id:'campaigns', role:'start',fx: 'slide', sourceOnShow: '/html/influencer/pages/campaigns/campaigns.html',beforeShow:Pages.viewCampaigns}"></div>
<div data-bind="page: {id:'campaign',scrollToTop:true}">
<div data-bind="page: {id:'view', fx: 'slide', sourceOnShow: '/html/influencer/pages/campaigns/campaign.html',beforeShow:Pages.viewCampaign, scrollToTop: true, sourceCache: true}"></div>
</div>
<div data-bind="page: {id:'account', fx: 'slide', sourceOnShow: '/html/influencer/pages/account/account.html',beforeShow:Pages.viewAccount}"></div>
<div data-bind="page: {id:'funds', fx: 'slide', sourceOnShow: '/html/advertiser/pages/funds/funds.html',beforeShow:Pages.viewFunds}"></div>
<div data-bind="page: {id:'fund'}">
<div data-bind="page: {id:'view',fx: 'slide', sourceOnShow: '/html/advertiser/pages/funds/view.html'}"></div>
</div>
<input type="text" data-bind="value: helloWorld"/>
<input type="text" data-bind="value : testValue"/>
var test = function(){
var self = this;
self.helloWorld = ko.observable('helloWorld');
self.testValue = ko.computed(function(){
return self.helloWorld();
},this)
}
var model = new test();
model.helloWorld.subscribe(function(val){
console.log(val);
})
ko.applyBindings(model);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment