ngx-card does not work on angular 6.
Hi,
I have install in my angular 6 application. But its show Two errors.
Uncaught TypeError: Cannot read property 'Directive' of undefined
at Object.
And second issue is:-
appComponent.html:13 ERROR ReferenceError: Card is not defined at NgxCard.push../node_modules/ngx-card/card.js.NgxCard.ngAfterViewInit (card.js:41) at callProviderLifecycles (core.js:9567) at callElementProvidersLifecycles (core.js:9541) at callLifecycleHooksChildrenFirst (core.js:9531) at checkAndUpdateView (core.js:10467) at callViewAction (core.js:10699) at execComponentViewsAction (core.js:10641) at checkAndUpdateView (core.js:10464) at callViewAction (core.js:10699) at execEmbeddedViewsAction (core.js:10662)
Same here.
GlobalErrorHandlerService.handleError: ReferenceError: Card is not defined
at NgxCard.push../node_modules/ngx-card/card.js.NgxCard.ngAfterViewInit (card.js:41)
at callProviderLifecycles (core.js:18854)
at callElementProvidersLifecycles (core.js:18828)
at callLifecycleHooksChildrenFirst (core.js:18818)
at checkAndUpdateView (core.js:19754)
at callViewAction (core.js:19986)
at execComponentViewsAction (core.js:19928)
at checkAndUpdateView (core.js:19751)
at callViewAction (core.js:19986)
at execComponentViewsAction (core.js:19928)
at checkAndUpdateView (core.js:19751)
at callViewAction (core.js:19986)
at execEmbeddedViewsAction (core.js:19949)
at checkAndUpdateView (core.js:19746)
at callViewAction (core.js:19986)
at execComponentViewsAction (core.js:19928)
Did someone find a fix?
I added in index.html and its works.
=/
I solved the NgxCard.ngAfterViewInit problem with a simple setTimeout, which made me figure out that the real problem was the loading spec
I solved the NgxCard.ngAfterViewInit problem with a simple setTimeout, which made me figure out that the real problem was the loading spec
ok, so that seems to be a problem with "real dom" render vs angular references to dom?
Any chance someone figured out how to fix this? Currently on Angular 8. Thanks
Any chance someone figured out how to fix this? Currently on Angular 8. Thanks
I added in index.html its works
I am on Angular 10. I keep getting the same error as Card not defined
I am clueless in finding it out. Can anyone, please explain what's going wrong.
Example Stackblitz: https://stackblitz.com/edit/ngx-card-example-project
I have added the script reference in the index.html and also imported the CardModule, but somehow it still says Card not defined.
After making sure card is installed via npm npm install --save card
In angular.json I added a reference to the node_modules script
....
"architect": {
"build": {
...
"options": {
...
"scripts": [
"./node_modules/card/dist/card.js"
]
....
this got rid of that error message for me
p.s. There were two places in the angular.json file for scripts so I added it to both arrays
I need help with this error message.
This likely means that the library (ngx-card/ngx-card) which declares CardModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
I am experiencing the same error too. Created a new issue for it https://github.com/ihym/ngx-card/issues/24