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

How to set containerStyle? #94

Closed
tbrockmoeller opened this issue Jan 12, 2022 · 4 comments
Closed

How to set containerStyle? #94

tbrockmoeller opened this issue Jan 12, 2022 · 4 comments

Comments

@tbrockmoeller
Copy link

I'm wondering how to apply the parameter containerStyle correctly.

NgxMasonryOptions accepts only a string. Can you tell me an example string that should work here, please? It does not work for me.

If I check https://masonry.desandro.com/options.html#containerstyle, there should be also objects possible. Is there a reason for excepting only strings?

@wynfred
Copy link
Owner

wynfred commented Jan 13, 2022

Hi, yes you're right. It should take objects. I'll make the change in the next release. However I would recommend changing the style from the angular side. I'm not sure about your use case but you should be able to get the layout you want without using the containerStyle

@tbrockmoeller
Copy link
Author

By applying a class name directly to the ngx-masonry element also works for me.

@wynfred wynfred closed this as completed Jan 15, 2022
@tbrockmoeller
Copy link
Author

Ok, but wasn't this issue closed a bit to fast, because the reported problem is still not solved?

@wynfred
Copy link
Owner

wynfred commented Jan 18, 2022

Well, I believe the containerStyle option should not be the preferred way to set element style in Angular. You should always try using the template or renderer first.

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

2 participants