목록attribute (1)
반응형
반응형
Eungene's Imaginations...
[Backbone.js] Model 기초 예제 소스
var Book = Backbone.Model.extend({ initialize: function () { this.on("change", function () { // 로그를 남기는 여러가지 방법 console.log('Model Changed'); if (this.hasChanged('name')) { console.log('The name has changed'); } if (this.hasChanged('author')) { console.log('The author has changed'); } console.log('Changed attributes: ' + JSON.stringify(this.changed)); }); }, defaults: { name: 'Book Title', autho..
Programming/Backbone.js
2015. 10. 1. 17:19