I have code that shows modal code using jquery:
$('#myModal').modal({'show':true});
but does not work with angular.js. what is equivalent $('#myModal')using angular.js?
$('#myModal')
// not works for me angular.element("#myModal")
You can use document.querySelectorto get the dom element and then useangular.element
document.querySelector
angular.element
var elem = angular.element(document.querySelector('#myModal'));
You can also try by typing $ document
var elem = $document('#myModal');
In your case, you will also make this small change to run your program.
var elem = angular.element(document).find('#myModal');
Source: https://habr.com/ru/post/1694119/More articles:collection linker syntax in Kotlin - collectionsNon-operand pointer error when dereferencing an iterator into a time range - c ++how to read values through a stream - javaHow to search for href ending with numbers using querySelectorAll () - javascriptbash regex for a word with some suffixes, but not one specific - bashHow can I get consistent high throughput in this loop? - c ++изменился стиль подчеркивания google chrome? - google-chromeCombining a 2D array with sorted rows of uneven size into a sorted 1st array - javaPerl tries to catch user-defined exceptions - perlTweenMax.js on the local server (MAMP) is incorrectly initialized - throws an error - javascriptAll Articles