-
Notifications
You must be signed in to change notification settings - Fork 129
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
Import gallery components styles individually #144
Comments
@magoss No, the docs are up to date. Where is the issue? the gallery is working in your stackblitz! |
I tracked the problem. It was the matter of place of import styles. I wanted to do it in component styles, but it works only in global file. It's mentioned in docs, you are right, but in my opinion it's a little bit optimization problem, because you have to import whole styles of gallery no matter user decide to load appropriate component. |
@magoss The styles aren't huge, their size combined are less than 4.5kb |
@MurhafSousli My use case is more like media attachments viewer. I use ngx-gallery to make it possible to review files attached to sort of reports. I'm not using this module like a carousel or slider at the home page. That's why I ment I wouldn't like to load styles in style.scss (global file). Instead, I want to load it only when user gets into reports (one of many pages). In Stickblitz example I'd like to load it in app.component.scss. Look at the repro once again, I edited it the way the import in styles.scss is commented out, but I placed similar one at the component level. It doesn't work that way. That is the clue. Because in my real world app I have to import it on global level regardless user needs it or not at all. Is there any workaround currently? |
No, currently it has to be loaded globally, did you try copy&paste gallery styles into your lazy component styles instead? |
Nope. I'm not prefer that way, because I'd like to be compliant with your library new versions. Failure to comply may cause problems with i.e. Angular upgrade. |
@magoss So what do you suggest? do you have a solution? |
I mean I'm afraid of copying code manually, because your library breaking changes could prevent me from smooth upgrade of ngx-gallery. If adapting breaking changes of your library would be required to be compliant with i.e the next version of Angular (which I encountered while working with other library) - it could potentially cause serious troubles for us. |
I've got a problem with implementing basic example. I followed code example shown on your page regarding Gallery:
https://murhafsousli.github.io/ngx-gallery/#/gallery
What is the expected behavior?
I'd like to display gallery in any way.
What is the current behavior?
Following code example from documentation seems to not work. Isn't documentation out-of-date, is it?
What are the steps to reproduce?
Check stackblitz out here:
https://stackblitz.com/edit/angular-cu7ygs?file=src/app/app.component.ts
Which versions are you using for the following packages?
Angular: 6.1.0
Angular CDK: 6.4.1
Angular CLI: 6
Typescript:
Gallery: 3.0.2
The text was updated successfully, but these errors were encountered: