I would use Primeng Card component
In module.ts I call the module.
import { CardModule } from 'primeng/card';
when compiling, angular don't find the module
ERROR in /home/haddad/projects/arrr/arrrt/src/app/app.module.ts (9,28): Cannot find module 'primeng/card'.
I'm using the version 4.2.4
when I update to version 5 of primeng I get this error
ERROR in Error: Metadata version mismatch for module /home/haddad/projects/node_modules/primeng/components/sidebar/card.d.ts, found version 4, expected 3, resolving symbol AppModule in /home/haddad/projects/ar/arrt/src/app/app.module.ts, resolving symbol AppModule in /home/haddad/projects/ar/arrt/src/app/app.module.ts
And I'm obliged to use angular 4.
Here's my package.json for more informations :
"dependencies": {
"@angular/animations": "^4.3.6",
"@angular/common": "^4.4.4",
"@angular/compiler": "^4.4.4",
"@angular/core": "^4.4.4",
"@angular/forms": "^4.4.4",
"@angular/http": "^4.4.4",
"@angular/platform-browser": "^4.4.4",
"@angular/platform-browser-dynamic": "^4.4.4",
"@angular/router": "^4.4.4",
"core-js": "^2.4.2",
"font-awesome": "^4.7.0",
"primeng": "^4.2.4",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "1.6.6",
"@angular/compiler-cli": "~4.3.4",
"@angular/language-service": "^4.3.4",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.3.4"
}
After 4 hours searching on the internet I realize that is not possible to use Card component with Angular 4.
Card component what create at PrimeNg 5.0.2 release : card new component
And PrimeNg 5.0.0 and above is not compatible with angular 4: PrimeNg blog
Angular 5 Support
PrimeNG 5 fully support Angular 5, if your project is on Angular 4, the PrimeNG version to use would be 4.x as PrimeNG 5 does not work on Angular 4 due to AOT constraints.
It's necessary to update Angular version to 5.