问题
I have used primeNg module from primefaces in angular 2 for creating a timepicker. I got it to work but it is displayed with broken design. Is there anything else to add for getting the design correct. Codes I used:
package versions:
"primeng": "^1.0.0-beta.7",
"primeui": "^4.1.10"
Module.ts:
import { CalendarModule } from 'primeng/primeng';
imports: [CalendarModule]
Html:
<p-calendar [(ngModel)]="value" showTime="showTime" formControlName="date1" hourFormat="12"></p-calendar>
Currently what i get is:
Please help!!
回答1:
You need to include css dependencies in your index.html-
<link rel="stylesheet" type="text/css" href="/node_modules/primeng/resources/themes/omega/theme.css" />
<link rel="stylesheet" type="text/css" href="/node_modules/primeng/resources/primeng.min.css" />
For more information, refer setup guide here.
来源:https://stackoverflow.com/questions/44536981/primeng-calender-displayed-with-broken-design-in-angular-2