当前我正在使用非常强烈的形式,并在HTML上使用输入,textareas,datepickers等,这会使代码看起来非常难看,也很难阅读。 的事情是,我创建了返回正确的HTML元素如自定义指令:从自定义指令中调用角度UI引导指令
在HTML
<suggest-input data-ng-model="EDCtrl.headerStep.provider.identification"
placeholder="'Ej. 888888-8'"
label="'Identificador de emisor'">
</suggest-input>
指令:
var suggestInput = function ($compile, $http) {
return {
restrict: 'E',
require: 'ngModel',
templateUrl: templates + '/suggestInputTemplate.tpl.html',
replace: true,
scope: {
model: '=ngModel',
label: '=label',
title: '=title',
placeholder : '=placeholder'
},
};
};
模板
<div>
<label>{{ label }}</label>
<input class="form-control" data-ng-model="model" placeholder="{{ placeholder }}" call="functionName()"/>
</div>
,我在使用角度引导指令时遇到问题我的自定义指令,例如: 如何在我的自定义指令中使用这种配置调用“uib-typeahead”?
任何想法?
[自定义指令中的Angular UI指令]的可能重复(https://stackoverflow.com/questions/48654008/angular-ui-directive-inside-custom-directive) – Isaac