Answer the question
In order to leave comments, you need to log in
How to correctly pass an array from $scope to a directive?
How to correctly accept such a transfer from $scope
vm.data - an array<div tx-chart information="vm.data"></div>
//директива
link: function(scope, element, attr) {
attr.information //выводит vm.data
}
Answer the question
In order to leave comments, you need to log in
//директива
scope: {information: "=information"},
link: function(scope, element, attr) {
scope.information //выводит массив
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question