Angular elements disabled with v1.9.0
See original GitHub issueGeneral Information
- Usage
- Development
- Documentation
- Feature Request
Specific generator
- Addons
- HandlebarsJS
What Version you are running?
- NodeJS: 10.16.3
- NPM: 6.5.0
- @pnp/spfx: 1.9.0
- Angular CLI : 8.3.2
Using the 1.9.0 version of the generator, the Angular elements option is disabled.
Steps to repro:
Install the latest generator and the Angular CLI
npm install -g @pnp/generator-spfx @angular/cli
Looks like when installing the generator in a fresh machine, the Angular elements option is disabled.
The reason behind this is that the latest Angular CLI downloaded version is 8.3.2. The generator only checks if the version 6 or 7 is installed. Need to add additional check for version 8.
Followed the instructions from here.
Temporary workaround while using generator 1.9 is to use Angular CLI v6 or v7 as below:
npm install -g @pnp/generator-spfx @angular/cli@6.2.9
or
npm install -g @pnp/generator-spfx @angular/cli@7.3.9
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
SPFx Angular Elements with @pnp/spfx generator
1 Answer 1 ... You also need to install the angular CLI. If that is not installed, this option is disabled. ... Once...
Read more >AngularJS to Angular concepts: Quick reference
AngularJS is the name for all v1.x versions of Angular. This guide helps you transition from AngularJS to Angular by mapping AngularJS syntax...
Read more >Enable/Disable Anchor Tags using AngularJS - Stack Overflow
Here is a css style that might indicate a disabled tag: ... cloneNode(true); var nextElem = angular.element(next); nextElem.on('click', function(e) { e.
Read more >How do I disable an HTML element with Angular ? - Blog
Angular makes it simple to disable an HTML element. Set the disabled attribute to the result of an expression and Angular will disable...
Read more >ngOptions - AngularJS: API
When an item in the <select> menu is selected, the array element or object property ... label disable when disable for value in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hey @StfBauer , great stuff. Tested it today, works perfectly fine. Thanks a lot !
ok sorry again 😦 . Please ignore the above comment.
I found the culprit for this issue in NG8. I had disabled the checks in the generator and created a fresh project in SPFx
Turns out when we have NG8 project created using the latest Angular CLI (v8), the
tsconfig.jsonhas the ECMA script target version is set toes2015. Once i change it toes5, everything works perfectly.So, the only change required is now in the Angular project’s
tsconfig.jsonfile.By default, it is generated as :
we need to change it to :
To test it, simply create a new Angular elements projects with Angular CLI v8. Try to execute gulp serve or any SPFx gulp commands, they will error out. Now, modify the
tsconfig.jsonfile as mentioned above. Execute the gulp commands or npm bundle commands, it will work smoothly.