samedi 16 juin 2018

link to another page inside loop angularjs.

$scope.InsertData = function () {

        $http.get('/insertdata', { params: { lid: $scope.locid, lname: $scope.locname, fid: $scope.fid, fname: $scope.fname, ftype: $scope.ftype, isp1: $scope.isp1, isp2: $scope.isp2, isp3: $scope.isp3, iis: $scope.iis, sid: $scope.switchid,no:$scope.rackno, appname: $scope.appname,dc:$scope.dc,cld:$scope.dc } })
            .success(function (data) {

                var nr = data; //this returns a no.

                while (nr) {
                    $window.location.href = '/Home/RackDetails';
                    nr--;
             }  //loop is working but the link is not. is there any other to accomplish this ??
             })
            .error(function () {

            });

i want to navigate to a page a number of times as specified by the user which is dynamic to the application




Aucun commentaire:

Enregistrer un commentaire