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

ngx-smart-modal not work angular universal #307

Closed jhimelymendoza closed 3 months ago

jhimelymendoza commented 3 years ago

Hello, I have an error in my project in with the libs, I was told to activate SEO to my project and when I compile on universal angle I get this error by ngx-smart-modal. But with a normal ng serve, everything compiles well can help me, it's a big project and changing bookstores is a problem here I leave them my environment

I import it normal with NgxSmartModule into the modules that I have to use

"dependencies": { "@angular/animations": "~9.1.1", "@angular/cdk": "~8.2.3", "@angular/common": "~9.1.1", "@angular/compiler": "~9.1.1", "@angular/core": "~9.1.1", "@angular/flex-layout": "~9.0.0-beta.29", "@angular/forms": "~9.1.1", "@angular/platform-browser": "~9.1.1", "@angular/platform-browser-dynamic": "~9.1.1", "@angular/platform-server": "~9.1.1", "@angular/router": "~9.1.1", "@fortawesome/fontawesome-free": "~5.12.0", "@nguniversal/express-engine": "^9.1.1", "@ngx-loading-bar/core": "~4.2.0", "@ngx-loading-bar/http-client": "~4.2.0", "@ngx-loading-bar/router": "~4.2.0", "@ngx-translate/core": "~11.0.1", "@ngx-translate/http-loader": "~4.0.0", "@types/faker": "~4.1.8", "@types/swiper": "~5.2.1", "angular-in-memory-web-api": "~0.9.0", "angular-tslint-rules": "~1.20.3", "angular2-notifications": "^9.0.0", "automapper-ts": "^1.9.0", "core-js": "~2.5.4", "express": "^4.15.2", "faker": "~4.1.0", "fc-ui-libs": "^1.0.12-alpha", "jwt-decode": "~2.2.0", "localstorage-polyfill": "^1.0.1", "moment": "~2.24.0", "ngx-drag-scroll": "~8.0.0-beta.2", "ngx-smart-modal": "~7.3.0", "ngx-swiper-wrapper": "^8.0.2", "ngx-tabset": "~2.2.0", "ngx-ui-loader": "~7.2.2", "ngx-useful-swiper": "~9.0.3", "rxjs": "~6.5.4", "swiper": "~5.3.0", "tslib": "^1.10.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.901.1", "@angular/cli": "~9.1.1", "@angular/compiler-cli": "~9.1.1", "@angular/language-service": "~9.1.1", "@nguniversal/builders": "^9.1.1", "angular-ng-autocomplete": "~2.0.1", "ng5-slider": "^1.2.3", "@types/express": "^4.17.0", "@types/node": "^12.11.1", "@types/jasmine": "~3.5.0", "@types/jasminewd2": "~2.0.3", "codelyzer": "^5.1.2", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.4.1", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~2.1.0", "karma-jasmine": "~3.0.1", "karma-jasmine-html-reporter": "^1.4.2", "protractor": "~5.4.3", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~3.8.3", "ftp-deploy": "^2.3.8", "husky": "~3.0.0", "lodash": "^4.17.15", "npm": "^6.14.8", "pm2": "^4.5.0", "prettier": "~1.18.2", "pretty-quick": "~1.11.1", "prompt": "^1.0.0", "prompt-confirm": "^2.0.4", "tslint-config-prettier": "~1.18.0", "webpack-cli": "^3.1.0" }

image

I hope you can help me, if I have to set any more example, they tell me. Thank you

maximelafarie commented 3 years ago

Hi @jhimelymendoza, I don't know if you fixed your issue, but maybe @khylias could help you since he has more experience than me with Angular Universal.

Any help @khylias? 😉

khylias commented 3 years ago

Without a sample project code it's not going to be easy. Do you use your modal Login from the ngAfterViewInit? I've already encountered this error, especially when using Lazy Loading. Is this your case?