Я создал одну директивудиректива сфера связывания внутри Dóm не работает
angular.module('MyApp')
.directive('testme', testme);
function testme() {
return {
restrict: 'E',
scope: {
items: '=',
testval: '='
},
template: '<div class="testclass"><div ng-transclude></div></div>',
transclude: true,
link: function (scope, element, attrs) {
}
}
}
В Мой контроллер у меня есть
$scope.myvalues = {"name":"someting"};
HTML
<testme items="myvalues">
{{items.name}} <!-- this is not working -->
</testme>
Я знаю, что непосредственно поместить это в шаблоне , Я просто хочу знать, почему его не работает внутри DOM, Как исправить