angular js及时获取数据值

var directiveData = app.directive("directiveP2", function () {
return {
link:function postLink(scope,lEle,lAttr) {
lAttr.$observe('attrDd', function(value) {
YTpageData.bodyAttr.bgMusic = value;
console.log(YTpageData)
});
}
};
});

原文地址:https://www.cnblogs.com/wuye1200/p/4209438.html