Balu Balu - 9 months ago 13
AngularJS Question

Issue while adding controls dynamically

I was adding and removing controls dynamically. However, I have a small requirement.

Below one is Jsbin code.,output

  1. Open the link.

  2. Click “Adperson”

  3. Now click Remove two times.

Observe, all control are removed and then you are not allowed to add controls.

My page should have at least one set of controls.



You can simply do:

  $("#associationRemove").on("click", function(){
      if($(".cloneMe").length > 1){