J'utilise ng2-admin template et j'essaie d'y inclure PrimeNG, mais j'ai du mal à l'ajouter.Impossible d'inclure PrimeNG dans l'application Angular 2 Webpack
modifications ci-dessous je l'ai fait dans le modèle pour inclure PrimeNG
./src/vendor.browser.ts:
// Prime faces: http://www.primefaces.org/primeng/#/setup
import 'primeng/primeng';
./src/app/app.module.ts:
import { ToggleButtonModule } from 'primeng/primeng';
@NgModule({
bootstrap: [App],
declarations: [
App
],
imports: [ // import Angular's modules
...
...
...
ToggleButtonModule
],
providers: [ // expose our Services and Providers into Angular's dependency injection
ENV_PROVIDERS,
APP_PROVIDERS
]
})
./src/app/pages/dashboard/dashboard.component.ts:
import { ToggleButtonModule } from 'primeng/primeng';
./src/app/pages/dashboard/dashboard.html:
<p-toggleButton [(ngModel)]="checked"></p-toggleButton>
J'obtiens l'erreur suivante:
Can't bind to 'ngModel' since it isn't a known property of 'p-toggleButton'.
- If 'p-toggleButton' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
- If 'p-toggleButton' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
Si je supprime ngModel de l'étiquette, je reçois erreur suivante:
'p-toggleButton' is not a known element:
- If 'p-toggleButton' is an Angular component, then verify that it is part of this module.
- If 'p-toggleButton' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
Quelle est la bonne façon d'intégrer PrimeNG dans l'application Angular 2-Webpack? Qu'est-ce qui me manque ici?