I want to use the data-bound value immediately:
Get data from Json file and bind it to scope
$scope.abc="hahahah";
<
p class="***" data-value="{{abc}}" skilldetail='' index='0'>
But when getting the data-value from the link function of the directive, I did not get "hahahah", but got {{abc}}
The value of element.find('.***').attr('data-value'); is {{abc}}, not hahahah.
How to do this? When does the value of ng-bing take effect?
滿天的星座2017-05-15 16:56:01
js
... link: function(scope, el, attrs) { ... scope.$apply(function() { // TODO }); ... } ...