我想创建一个带链接的自定义列,并在ng-click上调用$ scope方法.对于ngGrid(如何从ngGrid中显示的按钮调用范围方法-in Angular js)有非常类似的问题,该解决方案有效.我正在使用ui-grid,它应该只是更新版本的ngGrid,但它似乎不适用于那里.
这是我的代码:
var app = angular.module('plunker', ['ui.grid']);
app.controller('MainCtrl', function($scope) {
$scope.gridOptions = {
data: [{name: 'test'}],
columnDefs: [{
field:'name',
displayName:'name',
cellTemplate: '<div ng-click="gridOptions.editUser()">Edit</div>'
}],
editUser: $scope.editUser
};
$scope.editUser = function() {
alert('It works!');
};
});
Run Code Online (Sandbox Code Playgroud)
http://plnkr.co/edit/Q5SuIeAPFpZaUKbmIDCn
以下是适用于ngGrid的原始解决方案:http://plnkr.co/edit/hgTQ1XdEVRyxscoNs76q
我正在使用 botbuilder-python 来构建 MS Teams 机器人。以下示例我能够回复消息。我正在努力创建全新的消息,而没有从 Teams 传递的现有活动。我修改了测试中的一些代码(https://github.com/Microsoft/botbuilder-python/blob/62b0512a4dd918fa0d3837207012b31213aaedcc/libraries/botframework-connector/tests/test_conversations.py)但我得到:
botbuilder.schema.error_response_py3.ErrorResponseException: (BadSyntax) 无法解析租户 ID
它是什么,我在哪里可以找到它(我可以从请求中取出它,但它并不理想)以及如何传递它?任何人都可以向我指出创建新对话的任何 Python 示例吗?