是否可以从浏览器控制台访问 Spine JS 模型?
是否可以从浏览器控制台访问 Spine JS 模型?如果是这样,怎么办?
Is it possible to access Spine JS models from the browser console? and if so, how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确实是: http://jsfiddle.net/SpoBo/rn9zA/
It sure is: http://jsfiddle.net/SpoBo/rn9zA/
此外,如果您的应用未绑定到窗口,您始终可以
require
您正在寻找的模型。 Spine 的require
方法绑定到窗口。如果您有一个用户模型 (app/models/user),那么您应该能够
User = require 'models/user'
。然后你可以 User.first() 或其他Also, if your app isn't bound to the window, you can always
require
the models you're looking for. Spine'srequire
method is bound to the window.If you have a User model (app/models/user), then you should be able to
User = require 'models/user'
. Then you can User.first() or whatever