Tag: falcor router

为什么不Falcor的setValue()在外部模型上工作?

在本地Falcor模型上使用setValue()时,它按预期工作,但是当模型移动到服务器时,会发生“500(内部服务器错误)”。 下面的例子工作正常(脚本在浏览器中运行) var $ref = falcor.Model.ref; var model = new falcor.Model({ cache: { productsById: { 1: { name: "Product ABC", otherAdd: "something 1" }, 2: { name: "Product 123", otherAdd: "something 2" }, }, _view: [ $ref('productsById[1]') ], _cart: [] } }); model. getValue("_view[0].name"). then(function(response1) { console.log( response1 ); model. setValue("_view[0].name", "Another book"). subscribe(function(response2){ console.log( […]