简体   繁体   English

polyfills.ts 不是用 ng new 创建的<project>与角cli</project>

[英]polyfills.ts does not get created with ng new <project> with the angular cli

I am working through some examples and learning angular.我正在研究一些例子并学习角度。 When a new project is created with the angular cli polyfills.ts is not generated.当使用角度 cli 创建新项目时,不会生成 polyfills.ts。 Has anyone else ran into this issue?还有其他人遇到过这个问题吗? Here is the generated file structure.这是生成的文件结构。

generated file structure生成的文件结构

1个

I have tried manually adding a polyfills.ts file to the src folder but that still does not seem to do the trick.我曾尝试手动将 polyfills.ts 文件添加到 src 文件夹,但这似乎仍然无法解决问题。

Since version 15 polyfills.ts is not generated and it is moved directly into angular.json.由于版本 15 polyfills.ts 没有生成,它直接移动到 angular.json 中。 So you don't have to add it.所以你不必添加它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 src / polyfills.ts(73,1)中的ERROR时出现web-pack错误:错误TS2304:找不到名称“ global”。 [ng] src / polyfills.ts(73,17): - web-pack error when ERROR in src/polyfills.ts(73,1): error TS2304: Cannot find name 'global'. [ng] src/polyfills.ts(73,17): 由于 CSP,Angular 动画在 Firefox 上不起作用(在 polyfills.ts 中使用 web-animations-js) - Angular animations not working on Firefox due to CSP (with web-animations-js in polyfills.ts) IE11在Angular2(TS)中发布Angular CLI项目,polyfills不工作 - IE11 issue Angular CLI project in Angular2(TS), polyfills are notworking 使用 npm 使 ng-bootstrap 用于 angular cli 项目 - Get ng-bootstrap to work for angular cli project with npm 使用SystemJS将ng2-ace库集成到新创建的angular-cli(angular2)项目中 - Integrate the ng2-ace library into a freshly created angular-cli (angular2) project using SystemJS Angular CLI(ng --version)命令错误TS和WebPack - Angular CLI (ng --version) command Error TS and WebPack “ ng new”选项-angular-cli - “ng new” option - angular-cli 用ng new创建一个新的角度项目 - Creating a new angular project with ng new Internet Explorer上的新Angular CLI项目失败 - New Angular CLI project fails on Internet Explorer Angular-CLI“ ng e2e”:在带有ts节点的量角器测试中缺少localStorage - Angular-CLI “ng e2e”: missing localStorage in protractor tests with ts-node
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM