I am trying to make a directive that would influence element width/height. Looking through examples I\'ve seen that you can get/set width/height by referencing appropriate f
If you are not including jQuery angular substitutes its own smaller library, jqLite. jqLite does not have a height() function for DOM elements, so you will either need to write your own or use the full version of jQuery in your project.
The limited jqLite api is here.
Geoff Genz is correct that jqLite has no height()
method or equivalent, but there is still a way to get the height of the selected element. Try this:
var height = element[0].offsetHeight;
element[0]
returns the pure DOM element (without the jqLite wrapper) which has an offsetHeight
property.