前端MVVM的应用UnitedStack.pptVIP

  • 2
  • 0
  • 约5.59千字
  • 约 57页
  • 2015-09-24 发布于重庆
  • 举报
前端MVVM的应用UnitedStack

var M= { firstName: “”, lastName: “”, fulllName: “” } knockout function ViewModel(){ this.firstName = ko.observable(Bob); this.lastName = ko.observable(Smith); this.fullName = puted(function() { return this.firstName() + + this.lastName(); }, this); } var p = new ViewModel console.log(p.firstName()) console.log(p.lastName()) console.log(p.fullName()) ember App = Ember.Application.create(); App.Person = Ember.Object.extend({ firstName: null, lastName: null, fullName: function() { return this.ge

文档评论(0)

1亿VIP精品文档

相关文档