只包含我需要的 Angular Material 模块 [英] Only include modules from Angular Material that I need
问题描述
我正在使用来自 Angular Material 的 $mdDialog 模块,但我不需要完整的库.是否可以只在项目中包含我需要的模块,我该怎么做?我已经使用 Bower 安装了 Angular Material,并在我的项目中使用了 Gulp.
I'm using the module $mdDialog from Angular Material but I don't need the full library. Is it possible to only include the modules that I need in the project, and how can I do that? I have installed Angular Material with Bower and using Gulp in my project.
推荐答案
很快 Angular Material 将变成 v1.1.0
作为主要版本.
Soon Angular Material will turn into v1.1.0
as a major release.
作为补充,material-tools
存储库将公布.
As an addition the material-tools
repository will be announced.
Material Tools 允许开发人员使用最必要的组件构建自定义的 Angular Material 版本.
Material Tools allows developers to build a custom Angular Material build with the most necessary components.
它还可以构建预编译的主题样式表,从而显着提高性能.
It also can build precompiled theme stylesheets, which improves the performance significantly.
Material Tools 已经可用,但仍处于测试阶段.
Material Tools is already available, but still in beta.
https://github.com/angular/material-tools
这篇关于只包含我需要的 Angular Material 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!