AngularJs简便的添加数据信息

$scope.add = function(){
     // 执行添加的操作
		 			$scope.users.push({
		 				name:$scope.nameId,sex:$scope.sexId,age:$scope.ageId,money:$scope.moneyId,time:$scope.timeId
		 			});
		 		
                // 数据信息置空
		 		    $scope.nameId="";
		 		    
		 		    $scope.sexId="";
		 		    
		 		    $scope.ageId="";
		 		    
		 		    $scope.moneyId="";
		 		    
		 		    $scope.timeId="";
		 		    
				  //可以设置显示与隐藏的操作,详情看楼主的博客
                 //  $scope.isshow = false;

		 		};
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章