升级字体令人振奋的4.7至5.11.1 Angular 6项目
在我的Angular 6
应用程序中,其中,partch.json中的父级模块使用font-font-awesswess 4.7
;
"font-awesome": "^4.7.0",
Angular.json;
"styles": ["projects/adminUI/src/styles.css",
"./node_modules/font-awesome/css/font-awesome.min.css"],
现在,新开发的我的子模块需要具有5.11.1版本的字体可感知图标,如果我将其升级到新版本,是否会对父级应用程序中的现有图标产生任何影响? 谁能建议如果有人以前做过,任何指针都将不胜感激吗?
In my angular 6
application, wherein the parent module uses font-awesome 4.7
as below in package.json;
"font-awesome": "^4.7.0",
angular.json;
"styles": ["projects/adminUI/src/styles.css",
"./node_modules/font-awesome/css/font-awesome.min.css"],
Now my child module which is developed newly needs to have font-awesome icons of the 5.11.1 version, if I upgrade this to the new version, will there be any impact on existing icons in the parent application?
Can anyone suggest if someone has done it before, any pointer would be highly appreciated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
注意:这是使用FA 6.1.1而不是5.11.1。
这取决于您如何展示Fontawesome图标。
如果您使用Fontawesess Angular包装器,那么您将不需要Angular.json中的任何内容。
下面的所有代码都是从Fontawesome的文档中收集的。
例子:
在包装中。
在app.module.ts中:
在component.ts:
键点 - 导入您将在组件中使用的字体!
在component.html中:
NOTE: This is using FA 6.1.1 instead of 5.11.1.
It depends on how you are presenting the FontAwesome Icons.
If you use the FontAwesome Angular wrapper, then you wouldn't require anything in Angular.json.
All the code below is gleaned from FontAwesome's docs.
Example:
In package.json: Use the appropriate NPM i for fonts needed.
In app.module.ts:
In a component.ts:
KEY POINT - IMPORT THE FONTS THAT YOU WILL USE IN THE COMPONENT!
In a component.html: