現在私は非常にextensフォームで作業しており、HTMLの入力、textareas、datepickersなどを使用しているので、コードが非常に醜く見えにくくなります。カスタムディレクティブ内の角度UIブートストラップ指令を
<suggest-input data-ng-model="EDCtrl.headerStep.provider.identification"
placeholder="'Ej. 888888-8'"
label="'Identificador de emisor'">
</suggest-input>
ディレクティブHTMLで
:
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>
事は、私は適切なHTML要素などを返すカスタムディレクティブを作成していることです
と私は角度ブートストラップディレクティブを使用して問題を抱えています私のカスタムディレクティブの例: カスタムディレクティブでこの種の設定を使用して "uib-typeahead"を呼び出す方法はありますか?
アイデア?
[カスタムディレクティブ内の角型UIディレクティブ]の複製があります(https://stackoverflow.com/questions/48654008/angular-ui-directive-inside-custom-directive) – Isaac