在AngularJS中添加指令
datepicker
, datepicker-language
ng-required="true"
.
$compile
angular.module('app') .directive('superDirective', function ($compile, $injector) { return { restrict: 'A', replace: true, link: function compile(scope, element, attrs) { if (element.attr('datepicker')) { // check return; } element.attr('datepicker', 'someValue'); element.attr('datepicker-language', 'en'); // some more $compile(element)(scope); } }; });
$compile
乌普特$compile
terminal:true
?
更新2select
option
相关分类