Я нашел решение вопроса выше.Код размещен ниже.Вот ссылка на Plunker.http://next.plnkr.co/edit/z2E9sE
var app = angular.module('plunker', ['ui.bootstrap']);
app.config(['$qProvider', function ($qProvider) {
$qProvider.errorOnUnhandledRejections(false);
}]);
app.controller('ModalCtrl', function ($rootScope, $scope, $uibModal) {
$rootScope.tableArray = [];
$rootScope.getRowsCountData = [];
$rootScope.getColsCountData = [];
$scope.open = function () {
var modalInstance = $uibModal.open({
templateUrl: 'modalContent.html',
controller: function ($scope, $uibModalInstance) {
$scope.tableCount = 0;
$scope.tables = [];
$scope.cols = [];
$scope.rows = [];
$rootScope.tableArray = [];
$rootScope.getRowsCountData = [];
$rootScope.getColsCountData = [];
$scope.makeArray = function () {
if ($scope.tableCount) {
for (let i = 0; i < $scope.tableCount; i++)
{
let obj = { rows: 0, cols: 0 };
$scope.tables.push(obj);
}
}
}
$scope.ok = function () {
$rootScope.tableArray = $scope.tables;
$uibModalInstance.close();
};
$scope.cancel = function () {
$uibModalInstance.dismiss();
};
},
});
};
});
app.filter('range', function () {
return function (input, total) {
total = parseInt(total);
for (var i = 0; i < total; i++) {
input.push(i);
}
return input;
};
});
<!DOCTYPE html>
POP UP
<!-- <table ng-repeat="t in makeArray() track by $index">
Col
-->
{{tableArray}}
ОК Отмена Создать полку
{{tableArray}}
RC