[英]How to use PrimeNg component in angular2 application?
I want to use prime-ng component in my angular2 application but still going confuse how to add in application.我想在我的 angular2 应用程序中使用 prime-ng 组件,但仍然对如何添加应用程序感到困惑。 Please give a working example of application with prime ng.
请给出一个使用prime ng的应用示例。
You have to install primeng and primeicons.您必须安装primeng 和primeicons。
npm i primeng primeicons -s
Then you have to import the styles in the angular.json.然后你必须在 angular.json 中导入样式。 Choose a Theme under ../primeng/ressources/themes/YOUR_CHOOSEN_THEM
在 ../primeng/ressources/themes/YOUR_CHOOSEN_THEM 下选择一个主题
"styles": [
"node_modules/primeng/resources/themes/nova-light/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
],
Now you can import the Modules you need from primeng.现在您可以从primeng 导入您需要的模块。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.