AngularJS: Directive isolate scope - scope variable undefined
问题 Please, can someone explain me, why attrDir 's scope variable is visible, and oneWay 's not? I thought that scope: {} is isolated as well. angular.module('test', []); angular.module('test').directive('attrDir', attrDir); function attrDir(){ return { scope: true, link: function(scope){ scope.hello = 'attrDir'; } }; } angular.module('test').directive('oneWay', oneWay); function oneWay(){ return { scope: { data: '<?' }, link: function(scope){ scope.hello = 'oneWay'; } }; } hello will be rendered