PubNub Angularjs、频道组出错
Error in PubNub Angularjs, channel group
我已经按照此 DOCUMENT 与 PubNub Angularjs 频道组合作。但是我得到了这个错误:
这是我的代码:
Pubnub.init({
publish_key: constants.PUBNUB_PUBLISH_KEY,
subscribe_key: constants.PUBNUB_SUBSCRIBE_KEY,
uuid: $scope.user.IncubatorContactId + "_Layout",
error: function(error) {
console.log('Pubnub.init() Error:', error);
}
});
Pubnub.channel_group_add_channel({
callback: function(m) {
console.log('channel_group_add_channel', 'success', m);
},
channel: channels[0],
channel_group: $scope.user.IncubatorContactId
});
有人请帮助我!
我找到了,channel_group应该是字符串而不是数字:
channel_group: "" + $scope.user.IncubatorContactId + ""
我已经按照此 DOCUMENT 与 PubNub Angularjs 频道组合作。但是我得到了这个错误:
这是我的代码:
Pubnub.init({
publish_key: constants.PUBNUB_PUBLISH_KEY,
subscribe_key: constants.PUBNUB_SUBSCRIBE_KEY,
uuid: $scope.user.IncubatorContactId + "_Layout",
error: function(error) {
console.log('Pubnub.init() Error:', error);
}
});
Pubnub.channel_group_add_channel({
callback: function(m) {
console.log('channel_group_add_channel', 'success', m);
},
channel: channels[0],
channel_group: $scope.user.IncubatorContactId
});
有人请帮助我!
我找到了,channel_group应该是字符串而不是数字:
channel_group: "" + $scope.user.IncubatorContactId + ""