javascript - Call function of angularjs instead of jquery -
angularjs has functions override jquery functions. e.g., wrap()
function there in angular.js
, in jquery-1.10.2
want call wrap()
function of angular.js
how should call it?
for now, when try call in directive this, calls jquery's wrap() function:
element.wrap(outerdiv);
the need of is, wrap() function doesn't work if it's called jquery. though wraps elements, doesn't give angular environment, e.g. {{ name }}
not print name
property. when removed jquery file, wrap()
function of angular.js
called , worked fine.
the angular js function .wrap()
same jquery function .wrap()
.
quoted docs:
if jquery available,
angular.element
alias jquery function. if jquery not available, angular.element delegates angular's built-in subset of jquery, called "jquery lite" or "jqlite."
source
so meaning if have jquery included, angular js function wrap()
alias jquery function wrap else jqlites .wrap()
(which same).
Comments
Post a Comment