On editor screen, sometimes click on + button only one click, it creates
more than text fields
Issue-ID: POLICY-629
Change-Id: I9acc95fa0a4a7df3828e579f994c06bfa3199eb5
Signed-off-by: guangxingwang <gw1218@att.com>
}
//After initially create the edit template, reset it to false.
$scope.isInitEditTemplate = false;
}
//After initially create the edit template, reset it to false.
$scope.isInitEditTemplate = false;
+ if($scope.temp.policy.editPolicy){
+ //reset it to false since the template has been created
+ $scope.temp.policy.editPolicy = false;
+ //clean all the events of addNewChoice
+ $scope.$on('$destroy', addNewChoice);
+ }
+
}
var ele = angular.element(document.getElementById("DynamicTemplate"));
$compile(ele.contents())($scope);
}
var ele = angular.element(document.getElementById("DynamicTemplate"));
$compile(ele.contents())($scope);