Article From:https://segmentfault.com/q/1010000011712935
Question:

    $scope.toggle22 = function () {
        confirm("Are you sure you want to build a building? If you build a building structure, you will not change "function () {"./ / $scope.toggle22 = function () {};/ / /$filter ('$scope.data') (number, 2);Console.log ($scope.data);For (VaR I =0); I < $scope.data.floors.length; i++) {For (VaR C =0; c< $scope.data.floors[i].room)S.length; c++) {If ($scope.data.floors[i].rooms[c].area) {$scope.data.floors[i].rooms[c].area = parseFloat ($scope.data.floors[i].rooms[c].area).ToFixed (2);If ($scope.data.floors[i].rooms[c].type = = "parking space"){$scope.data.floors[i].rooms[c].area = null;}Else{}}Else{If ($scope.data.floors[i].rooms)[c].type! = "parking space"){Var type = $scope.data.floorS[i].rooms[c].type;Var name = $scope.data.floors[i].rooms[c].name;Alert ('you fill in the information ['+name+'] + type + 'has not yet completed the area');RetUrn;}}}}CoNsole.log ($scope.data);$http ({Method:'POST',Url: '../app/mansion/addMansion',/ / data:{mansion: encodeURIComponent ()},/ / headers{'Content-Type':'application/x-www-form-urlencoded'}Data: "mansion=" + angular.toJson ($scope.data,'utf-8')./ / data: jsonToStr.transform ($scope.data), / / formatting the submitted data.Headers: {'Accept':' * / * ','Content-Type':'appLication/x-www-form-urlencoded; charset=UTF-8'}}.Success (function (DA))TA, header, config, status) {/ / / response/ / Alert (data.msg)Window.locatioN.href = "management.html"}.Error (function (data, header, config, status) {/ / response failureAlert (data.msg)});});/ / if (confirm ("are you sure you want to build a building? If you build a building structure")Cannot be changed)) {/ / $scope.toggle22 = function () {};/ / $http ({)/ / methOd:'POST',/ / url:'../app/mansion/addMansion',/ / / / data:{mansion: encodEURIComponent ()},/ / / / headers: {'Content-Type':'application/x-www-form-urlencoded'}/ / data: "mansion=" + angular.toJson ($scope.data,'utf-8')./ / / / data: JSONToStr.transform ($scope.data), / / format for submitted data/ / headers: {/ /'Accept':' * / * ',/ /'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'/}/ /}.Success (function (data, header, config, status) {/ / / / response/ / /Alert (data.msg)/ / window.location.href = "management.html"/ / // / /}.Error (function (data, header, config, status) {/ / / / response failure/ / Alert (data.msg)/ /};/ /}}});

Answer 0:

Is it a question of time?

Leave a Reply

Your email address will not be published. Required fields are marked *