Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directive doesn't work if the hierarchy is not direct #28

Open
lonormaly opened this issue Aug 20, 2015 · 2 comments
Open

Directive doesn't work if the hierarchy is not direct #28

lonormaly opened this issue Aug 20, 2015 · 2 comments

Comments

@lonormaly
Copy link

Hello,

The directive isn't working if the masonry-tile is not a direct child of masonry.
Let's say I have a directive called "thumbnail" which contains a template:

and the masonry-tile should be on the div.
Currently, there is an error:
TypeError: Cannot read property 'update' of undefined
From var master = elem.parent('*[masonry]:first').scope(),
update = master.update, on the directive (line 54).

Can you support non-direct child of masonry?

Thanks,
Shai

@RopoMen
Copy link

RopoMen commented Nov 10, 2015

Also I noticed one thing in this line

var master = elem.parent('*[masonry]:first').scope(),

I think it will break if masonry directive is initialized through class, because directive gives that change
restrict: 'AC',

@shashank1992
Copy link

Hello,
I find another problem with the above line.
var master = elem.parent('*[masonry]:first').scope()
I tried to use two masonry divs in one page which doesn't work. I figure the problem is because of the above line. Which is why all the elements in the first masonry are hidden even though they are loaded .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants