CSS selectors not working after AngularJS upgrade

Viewed 94

I've migrated an AngularJS application from version 1.2.26 cu 1.5.11 and I'm having some troubles with selectors.

In a directive I have this piece of code:

var menu = element.find('.menu-list');
var menuWidth = menu.innerWidth();
var menuItem = menu.find('li').width(menuWidth);

Where element refers to the element attribute from the link function.

After migration, this code throws an error saying: TypeError: menu.innerWidth is not a function

What do I need to modify in order to make the code work again?

0 Answers
Related