【发布时间】:2013-02-26 15:17:51
【问题描述】:
我正在编写一个利用 Ember.js、Ember Data 和通过 Node.js 的 Socket.IO 的应用程序。我正在尝试找出从套接字响应接收数据并将其加载到我的 Ember 数据存储中的最佳方法,例如:
window.socket = io.connect('http://localhost');
socket.on('action here', function(response) {
// how to load "response" JSON data into Ember Data store from here...?
});
编写自定义 DS.Adapter 是最好的(或唯一好的)解决方案吗?还是有其他好的、可维护的方法来完成这个?
【问题讨论】:
标签: node.js ember.js socket.io ember-data