Answer the question
In order to leave comments, you need to log in
And how to pass an array to the template used in the angular modal?
Пример, есть некий контроллер. Внутри него есть массив
app.controller('MyCntrl', //тут всякие зависимости function(...) {
$scope.myArray = [];
// и есть функция показа модального окна
$scope.myDlgWindow = function () {
console.debug($scope.myArray); // тут всё хорошо
$scope.modalInstance = $modal.open({
scope: $scope,
controller: 'MyCntrl',
template: 'тут прочий код модального окна...<select ng-options=\"items as item for item in myArray\"' // А тут уже не видим
}
});
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