Answer the question
In order to leave comments, you need to log in
Updating $scope via directive attribute value in AngularJS
Hello.
I'm not very familiar with Angular.
There is a custom directive, the path to the $scope that needs to be updated is passed as a value:
<div custom-directive="data.sliders[0].title"></div>
.directive('customDirective', function() {
return {
link: function(scope, element, attrs) {
// scope.data.sliders[0].title - это то, как должно работать, но через значение attrs.customDirective
// scope.??
}
}
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question