Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的视图订阅了我的模型的删除事件。我看到模型删除事件被神秘地触发,并且无法找到从我的代码发送的位置/方式。在运行时,我看到模型被添加到我的集合中,然后立即被删除。如何解决此问题?
如上所述:
如果您的视图正在监听 destroy 事件。然后给它一个回调方法吧。在事件中放置一个调试点并检查调用堆栈。在调试模式下,您可以在开发者工具的 Source 选项卡的右侧找到它。