也不能说不能获取,但是不知道出了什么问题, scope
可以看到, 但是通过属性访问却访问不到
具体看下面代码和图片
html
中
<ul widget-paginate="vm.activities"></ul>
directive.js
中
var directive = {
scope:{
paginate : '=widgetPaginate'
},
link : link
}
function link(scope, ele, attrs){
console.log(scope);
console.log("---------directive---------");
console.log(scope.paginate.data);
console.log("---------directive---------");
}
Because of the asynchronous problem of data
Is this data obtained from the background?
Use $watch to monitor and you will know. I also think it is an asynchronous problem.