After installing primeng using the command npm install primeng --save
,
I have version ^12.0.1
of primeng listed in both dependencies and devDependencies in my package.json file.
In my angular.json file, I have included the necessary styles:
"styles": [
"node_modules/primeng/resources/themes/saga-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css",
//...
],
Within my login.module.ts file, I have imported the required modules:
import {PasswordModule} from 'primeng/password';
import {ButtonModule} from 'primeng/button';
@NgModule({
...
imports:[
...
ButtonModule,
PasswordModule
]
})
I typed out the code snippets for password and button elements as follows:
<p-password></p-password>
<p-button></p-button>
The login module is located within the login folder nested inside the app folder.
Edit: The p-password and p-button components function correctly when used in the app module, but not in the login module.
I have configured the routing within the app routing module to direct to the login module.
Edit: Due to ongoing issues, I ultimately decided to merge the login component with the app module and remove the login module altogether. It has been a frustrating experience.