Fixed the Policy API issues and Bugfixes
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplateController / ActionPolicyController.js
index 6ca9dfd..398b285 100644 (file)
@@ -29,6 +29,7 @@ app.controller('actionPolicyController', ['$scope', 'PolicyAppService', 'policyN
                $scope.policyNavigator.refresh();
        }
        $scope.modal('createNewPolicy', true);
+       $scope.temp.policy = "";
     };
     
     $scope.modal = function(id, hide) {
@@ -142,6 +143,7 @@ app.controller('actionPolicyController', ['$scope', 'PolicyAppService', 'policyN
 
     if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
        $scope.temp.policy.attributes = [];
+       $scope.temp.policy.attributes.push({'id':'choice'+1});
         $scope.temp.policy.ruleAlgorithmschoices = [];
     }else{
           if($scope.temp.policy.attributes.length == 0){