我将 textAngular Wysiwyg/Text-Editor 与@mentio 库一起使用,当我使用指令不止一个的 html 页面时,它会导致问题。我尝试使用上下文编辑器进行提及 id 仍然无法解决问题
<mentio-menu mentio-for="'content-editor-{{$id}}'"
mentio-trigger-char="'@'"
mentio-items="people"
mentio-template-url="/iterator.tpl"
mentio-search="searchPeople(term)"
mentio-select="getPeopleText(item)">
var directiveDefinitionObject = {
restrict: 'E',
templateUrl: "app/partials/textAngular-mention-template/replyTextAngularWithMentio.html",
require: '^ngModel',
scope: {
ngModel: '='
},
controller: ['$scope', function ($scope) {
$scope.setup = function (element) {
element.attr('mentio', 'mentio');
element.attr('mentio-typed-term', 'typedTerm');
element.attr('mentio-require-leading-space', 'true');
element.attr('mentio-id', "'content-editor-{{$id}}'");
};