我面临弃用方法的问题:
Chart.js:1990 bar chart: "scales.[x/y]Axes.maxBarThickness" is deprecated. Please use "dataset.maxBarThickness" instead
Run Code Online (Sandbox Code Playgroud)
如何解决?
我正在使用以下方式动态设置条形图的 maxBarThickness
this.barOptions.scales.xAxes[0]['barPercentage'] = 0.8;
Run Code Online (Sandbox Code Playgroud)
但这现在正在发出警告。
请分享您的建议!
在我的项目中,我需要使用 Gotham Book font-family 并且我使用以下代码:
@font-face {
font-family: 'Gotham Book';
src:
url('assets/fonts/Gotham-Book.eot'),
url('assets/fonts/Gotham-Book.eot?#iefix') format('embedded-opentype'),
url('assets/fonts/Gotham-Book.woff2') format('woff2'),
url('assets/fonts/Gotham-Book.woff') format('woff'),
url('assets/fonts/Gotham-Book.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)
如果在 android 设备和除 safari 浏览器之外的其他浏览器中完美运行。请建议我的代码有什么问题。
是什么导致了这个问题?
我也尝试过使用 Gotham Book svg 导入,但对我不起作用。
先感谢您!
差异加载是一种策略,其中 CLI 构建两个单独的包作为已部署应用程序的一部分。
Angular CLI 版本 8 及更高版本默认支持差异加载。对于工作区中的每个应用程序项目,您可以根据应用程序项目中的 browserslist 和 tsconfig.json 文件配置如何生成构建。
如果我们有两个具有差异加载功能的独立捆绑包,是否会导致构建大小问题和应用程序性能?
请分享您的建议,以便我可以在我当前的项目中选择此功能。