亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何看懂api文檔?

如何看懂api文檔?

犯罪嫌疑人X 2018-08-09 10:09:56
有沒有相關的課程可以學習,經常看api文檔看的理解不對,尤其是那些缺少實例代碼的。例如下面這一段http://docs.meteor.com/api/pubsub.html#Meteor-subscribeMeteor.subscribe(name, [arg1, arg2...], [callbacks])import { Meteor } from 'meteor/meteor' (ddp-client/livedata_connection.js, line 521)Subscribe to a record set. Returns a handle that provides stop() and ready() methods.ARGUMENTSname StringName of the subscription. Matches the name of the server's publish() call.arg1, arg2... EJSON-able ObjectOptional arguments passed to publisher function on server.callbacks Function or ObjectOptional. May include onStop and onReady callbacks. If there is an error, it is passed as an argument to onStop. If a function is passed instead of an object, it is interpreted as an onReady callback.實際使用callbacks的寫法應該是Meteor.subscribe("name",{ onReady:function(){//代碼}}但是從文中的描述來看我根本想不到實際的寫法應該是這樣,不知道應該怎么理解。有沒有系統的學習看api文檔的教程?求教!
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 1718 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號