có bạn nào rành về falcor.js không
-
giúp mình tại sao $ref nó không trả về testRef ?
Server:app.use('/model.json', falcorExpress.dataSourceRoute(function(req, res){ return new falcorRouter([ { route: 'greeting', get: function(pathSet){ return { path: ['greeting'], value: { $type: 'ref', value: "testRef" } } } }, { route: 'testRef', get: function(pathSet){ return { path: ['testRef'], value: 'Hello World' } } } ]) }))
kết quả tại : http://localhost:3000/model.json?paths=[["greeting"]]&method=get
{"jsonGraph":{"greeting":{"$type":"ref","value":"testRef"}}}