Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the equivalent of $('#xxl') selector of jquery in angular.js

Tags:

I have a code,that shows a modal with this code using jquery:

$('#myModal').modal({'show':true});

but with angular.js not works. what is the equivalent of $('#myModal') using angular.js?

// not works for me
angular.element("#myModal")
like image 548
yavg Avatar asked Feb 26 '18 04:02

yavg


1 Answers

You can use document.querySelector to get the dom element and then use angular.element

var elem = angular.element(document.querySelector('#myModal'));
like image 150
Vineesh Avatar answered Oct 11 '22 11:10

Vineesh