MD Ghouse MD Ghouse - 27 days ago 7
AngularJS Question

How to stop bootstrap modal for some time

Here i'm using AngularJs code along with Bootstrap here i want to stop Modal for few seconds before it execute next code.

xxer.then(function (msg) {
if ($scope.msg = "Your A/c Activated ....") {
$scope.msg = msg.data;
$timeout(function () {
$('#modal2').modal('show')

},4000)
$window.location.href = '/Account/Inbox';


Before it execute $window.location.href = '/Account/Inbox'; this code i wana to stop it 4sec please helpme how can i

Answer

It should be other way,

xxer.then(function (msg) {
if ($scope.msg = "Your A/c Activated ....") {
   $scope.msg = msg.data;
   $('#modal2').modal('show')
   $timeout(function () {
     $window.location.href = '/Account/Inbox';
},4000)