maximelafarie / ngx-smart-modal

Modal/Dialog component crafted for Angular (Ivy-compatible)
https://maximelafarie.com/ngx-smart-modal/
MIT License
323 stars 87 forks source link

Using in Angular 6 #138

Closed rsmachir closed 6 years ago

rsmachir commented 6 years ago

I'm submitting a ... (check one with "x")

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior In angular6, component just opens on to the page, instead of in a modal pop-up No console errors. Close and other features all work fine. Expected behavior

Expected to open

Reproduction of the problem

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

khylias commented 6 years ago

Hi @rsmachir ,

after some tests with Angular 6 and NgxSmartModal, I didn't find any bug as you describe. Check out on stackblitz below for a light Angular 6 ft NgxSmartModal setup : https://stackblitz.com/edit/angular-tckfpe

I think you forgot to import the NgxSmartModal css file as indicated in the documentation: https://github.com/biig-io/ngx-smart-modal#setup 🤘

If that's not your problem, I invite you to describe it more and reproduce the bug on a stackblitz for example. 😃

Happy coding ! 👌

rsmachir commented 6 years ago

I did import NgxSmartModal, did not help. No errors, everything seems to work, except content just opens the div on the page itself instead of a popup. Will try to reproduce the bug on stackbiz and get back to you. Thank you.

rsmachir commented 6 years ago

I got it working now. I had to add the NgxSmartModal CSS reference into my angular.json file instead of importing it into the main style sheet. You an close this out now. Thanks your help.

mikeKane commented 6 years ago

I apologize for reopening this issue, I am quite new to Ng and I am having the same issue. The Modal just opens at the div.

I also do not have the css file imported, I am attempting to include it with the follow "styles": [ "src/styles.css", "src/ngx-smart-modal.css" ], but the compiler complains this doesn't exist. I am using Ng 6.

maximelafarie commented 6 years ago

Hi @mikeKane, I answered you on #155. 😉