AngularJS supports .empty(), .remove() jQuery functionality. Here in below examples we can see how to empty and remove an element.
Angular2 : If you are looking for Angular2 solution, Please click here

Steps to Empty an Element :

  1. Get angular element of html element
  2. Use .empty() method to clear all data in that element
var myEl = angular.element( document.querySelector( '#divID' ) );
myEl.empty();

Steps to Remove  an Element :

  1. Get angular element
  2. Use .remove() method to remove the element from the document
var myEl = angular.element( document.querySelector( '#divID' ) );
myEl.remove();

20 comments:

  1. This is exactly what i was looking for. Thanks

    ReplyDelete
  2. How can we get element using class name?

    ReplyDelete
    Replies
    1. var myEl = angular.element( document.querySelector( '.className' ) );

      Delete
  3. Is chaining possible after empty()?

    ReplyDelete
  4. Excellently written article, if only all writtens offered the same level of content as you, the internet would be a much better place.
    Dissertation Writing Service

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. So in the event that you wish to recoup your lost password and access your vital record once more, at that point keep perusing this article to discover how... remove password

    ReplyDelete
  7. This is really good blog information thanks for sharing .I am really impressed with your writing abilities


    โปรโมชั่นGclub ของทางทีมงานตอนนี้แจกฟรีโบนัส 50%
    เพียงแค่คุณสมัคร Gclub กับทางทีมงานของเราเพียงเท่านั้น
    ร่วมมาเป็นส่วนหนึ่งกับเว็บไซต์คาสิโนออนไลน์ของเราได้เลยค่ะ
    สมัครสล็อตออนไลน์ >>> goldenslot
    สนใจร่วมลงทุนกับเรา สมัครเอเย่น Gclub คลิ๊กได้เลย

    ReplyDelete
  8. Not working for a big html

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Your blogs are amazing. Keep sharing. I love them Are you also searching for urgent assignment help? we are the best solution for you. We are best known for delivering the best urgent assignment help.

    ReplyDelete

  11. Very wonderful informative article. I appreciated looking at your article. Very wonderful reveal. I would like to twit this on my followers. Many thanks!

    bulletintech
    how tall is dababy
    henry sedgwick v
    justdubs
    citra emulator apk
    frank rocky fiegel
    how to program rca universal remote
    taylor olsen
    natalie 90 day fiance

    ReplyDelete
  12. Forex Trading Reviews Is An Online Portal That Provides One Stop Solution For Traders. Forex Trading Reviews Helps Traders In Finding The Best Brokers Available. Here You Can Read Real Time Updated Reviews On Best Brokers Along With Their Login Details. Forex Trading Reviews Aims To Provide Expert Advice About The Latest Trading Strategies And Tools Used By Successful Traders.

    ReplyDelete

Blogroll

Popular Posts