How we can enable Angular elements in SPFx webpart using @pnp/spfx generator?
1 Answer
You also need to install the angular CLI. If that is not installed, this option is disabled.
To install the CLI, you can do that as below:
npm install -g @angular/cli Once installed, this option will be enabled.
Update - based on comments.
Looks like there is some sort of regression in the 1.9.0 version.
To use the angular elements with the latest version, you need to use an older version of Angular CLI as below:
npm install -g @pnp/generator-spfx @angular/[email protected] or
npm install -g @pnp/generator-spfx @angular/[email protected] Reference - Angular elements in PnP SPFx generator
- I have already installed it but somehow not workingChandani Prajapati– Chandani Prajapati2019-09-02 11:01:56 +00:00Commented Sep 2, 2019 at 11:01
- Did you install it globally ? Also try doing that in admin mode.Gautam Sheth– Gautam Sheth2019-09-02 11:04:35 +00:00Commented Sep 2, 2019 at 11:04
- Yes i also added globally as an admin but not workingChandani Prajapati– Chandani Prajapati2019-09-02 11:07:07 +00:00Commented Sep 2, 2019 at 11:07
- I have updated question and added screenshot for versionsChandani Prajapati– Chandani Prajapati2019-09-02 11:08:03 +00:00Commented Sep 2, 2019 at 11:08
- 1never mind, looks like a regression in the latest version. Can you use the older version of the generator using
npm install -g @pnp/[email protected]and tryGautam Sheth– Gautam Sheth2019-09-02 11:17:32 +00:00Commented Sep 2, 2019 at 11:17


