这是 CoffeeScript 中的代码:
class this.User extends Backbone.Model
initialize: ->
@access_token
@cur_video_id_playing
@logged_in = 0
@username
this.bind "change:username", () -> alert this.get(username)
this.user = new User;
当我在开发者控制台中并调用
user.username = "newname"
警报不会触发。我究竟做错了什么?
谢谢!