JSFiddle - React, Tailwind, and code Playground
JavaScript
//this is just code example. It's not working here
App.controller('ModalCtrl', function ($scope, $timeout) {
for (var i = 0; i < 10; i++) {
(function () {
var timer = $timeout(function () {
console.log('timer')
}, 1000);
})()
}
})
App.controller('MainCtrl', function ($scope, $modal, $timeout) {
$scope.showMap = function () {
var modal = $modal.open({
templateUrl: 'modalap.html',
controller: 'modalCtrl',
})
modal.result.then(function () { //fires when modal is resolving
}, function () { //fires when modal is invoking
});
}
})