I am showing bootstrap3 **alert**,when clicking **SAVE button** *success/error/warning messages will appear in below of the Button*.
The Issue is ALERT is shown but not removed like **slideup function** is not working,i written the code In-Line HTML

```
<script type="text/javascript">
    window.setTimeout(function() {
        $(".alert").fadeTo(500, 0).slideUp(500, function(){
            $(this).remove(); 
        });
    }, 4000);
    </script>

```

This same code i use some other pages,it works perfectly,But in this page i used AngularJs **ng-switch** condtion checking..So here is the HTML Code 

```html
<div class="form-group" ng-model="ngModelAlertmsg" ng-switch="ngModelAlertmsg">
  <div class="col-md-9 col-md-offset-3">
  <script type="text/javascript">
  window.setTimeout(function() {
      $(".alert").fadeTo(500, 0).slideUp(500, function(){
          $(this).remove(); 
      });
  }, 4000);
  </script>

   <div ng-switch-when="success" class="alert alert-success alert-dismissible fade in col-md-6 alert-trim">
    <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
    Charges Updated successfully.
   </div>
   <div ng-switch-when="failed" class="alert alert-danger alert-dismissible fade in col-md-6 alert-trim">
    <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
    Something went wrong,Please try again later. 
   </div>  
   <div ng-switch-when="warning" class="alert alert-warning alert-dismissible fade in col-md-6 alert-trim">
    <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
    Please check your given data. 
   </div>                 
  </div>
 </div>
```

```js
var app = angular.module('ngapppmanual', []);
app.controller('ngctrlmanual', function($scope, $http, $location) {

    $scope.ngshowchargelist = false;

    $scope.getChargeDetails = function()
    {
        var url = $location.absUrl() + "/showmanuallist/" + $scope.selectedcharge;

        var config = {
            headers : {
                'Content-Type' : 'application/json;charset=utf-8;'
            }
        }

        $http.get(url, config).then(function(response)
        {

            if (response.data.status == "success")
            {
                $scope.manualresult = response.data.dataObj;
                $scope.ngshowchargelist = true;
                $scope.ngModelAlertmsg = response.data.status;

            } else
                {
                $scope.getResultMessage = "Customer Data Error!";
                $scope.ngModelAlertmsg = "warning";
                }

        },
            function(response)
            {
            $scope.getResultMessage = "Fail!";
        });

    }
```

I tried in chrome console it does not shown any errors.So i am confused,please help me out.Thanks in advance.