AngularJS supports .wrap() jQuery functionality. Here in below examples we can see how to wrap HTML structure around an element.

Steps to wrap div around an element:

  1. Get angular element of html element
  2. Use .wrap() method to wrap element
var myEl = angular.element( document.querySelector( '#divID' ) );
myEl.wrap('<div></div>');

Steps to wrap element around an element::

  1. Get angular element
  2. Use .wrap(element) method to wrap an element around another element
var myEl = angular.element( document.querySelector( '#divID' ) );
var wEl = angular.element( document.querySelector( '#wrapID' ) );
myEl.wrap(wEl);

2 comments:

  1. wrap(element) method to wrap an element around another element C_ARP2P_19Q3 dumps

    ReplyDelete
  2. Good blog. I learned a lot from this blog. Are you also searching for University Assignment Help ? we are the best solution for you. We are best known for delivering cheap essays to students without having to break the bank

    ReplyDelete

Blogroll

Popular Posts