Javascript 离子指令 VS 带有离子框架的 Angular 材料指令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28916985/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Ionic directives VS Angular material directives with Ionic Framework
提问by Vamsi
I want to use ionicwith material design. I am stuck between using ionic directives with custom CSS and angular-material
我想在材料设计中使用离子。我被困在使用带有自定义 CSS 和angular-material 的离子指令之间
I have read that using ionic directives we get lot of efficient features like
我读过使用离子指令我们可以获得很多有效的功能,比如
App data is remembered with UI-router, even after navigating to other view and coming back to the page
Ionic list items are rendered only up to display height and reused when scrolling down or up
UI-router 会记住应用数据,即使在导航到其他视图并返回页面之后
离子列表项仅向上呈现以显示高度并在向下或向上滚动时重复使用
and a lot of performance improvements.
以及许多性能改进。
But, if I use ionic directives they don't have the material design.
但是,如果我使用离子指令,它们就没有材料设计。
If I use angular-material I will not have these performance improvements, and extra features needed for a mobile application.
如果我使用 angular-material,我将不会有这些性能改进,以及移动应用程序所需的额外功能。
Angular-material directives are like
角度材料指令就像
<md-list>
<md-item ng-repeat="item in items">
Hello, {{item}}!
</md-item>
</md-list>
Ionic directives are like
离子指令就像
<ion-list>
<ion-item ng-repeat="item in items">
Hello, {{item}}!
</ion-item>
</ion-list>
Looks like Ionic is funding angular-materialproject development, then why is angular-material not compatible to use with ionic?
看起来Ionic 正在资助 angular-material项目开发,那么为什么 angular-material 与 ionic 不兼容?
How can I use angular-materialcomponents without losing the performance improvements and features of ionic?
如何在不失去 ionic 的性能改进和特性的情况下使用角材料组件?
OR
或者
is there a better idea for using material design with ionic?
使用带有离子的材料设计有更好的主意吗?
采纳答案by Vamsi
I found a material design CSS framework known as Materializecss. It looks promising. It's just plain CSS and javascript framework.
我找到了一个名为Materializecss的材料设计 CSS 框架。看起来很有希望。它只是简单的 CSS 和 javascript 框架。
Advantages over other frameworks
与其他框架相比的优势
- Pure CSS classes, will not conflict with ionic directives. No performance loss.
- Of all the frameworks I have seen, this is the only one closely following material design rules
- Almost ready it has about 50+ contributors it's current Version 0.95.3 in less than 6 months
- Easy to use. Well documented with feature wise navigation.
- It has almost all the material design features needed for an app.
- 纯 CSS 类,不会与离子指令冲突。没有性能损失。
- 在我见过的所有框架中,这是唯一一个严格遵循材料设计规则的框架
- 几乎准备好了,它有大约 50 多个贡献者,它在不到 6 个月的时间内推出了 0.95.3 版
- 便于使用。有据可查的功能明智的导航。
- 它几乎具有应用程序所需的所有材料设计功能。
This page http://materializecss.com/getting-started.htmlwill show you how to include it in your projects.
此页面http://materializecss.com/getting-started.html将向您展示如何将其包含在您的项目中。
I hope this helps for any of you searching for a good material design framework.
我希望这对寻找好的材料设计框架的任何人都有帮助。
UPDATE: 2015-07-09
更新:2015-07-09
I Found another lightweight powerful beautiful CSS framework for material design
我发现了另一个用于材料设计的轻量级强大的漂亮 CSS 框架
Material Design Lighthttp://www.getmdl.io/
Material Design Light http://www.getmdl.io/
It is lightweight, has smooth and quick animations, looking pretty good. It was made by one of the Google developers. It is officially promoted by google https://developers.google.com/web/. It is getting quite popular, try it. Comparision with Angular Material
它是轻量级的,具有流畅和快速的动画,看起来很不错。它是由一位谷歌开发人员制作的。它由 google https://developers.google.com/web/官方推广 。越来越流行了,试试吧。与角材料的比较
UPDATE: 2015-10-23
更新:2015-10-23
Ionic2 has InBuilt Support for Material Design in Android
Ionic2 内置支持 Android 中的 Material Design
It's Official, You can watch Ionic2 demo in AngularConnect, It has Material Design as default for Android. We don't need to worry about choosing a Material Design framework.
它是官方的,您可以在 AngularConnect 中观看Ionic2 演示,Android 默认采用 Material Design。我们无需担心选择 Material Design 框架。
回答by darryn.ten
There is a fairly new project called Ionic Material.
有一个相当新的项目叫做Ionic Material。
I've tried it out and it works pretty well, but be advised that it is still in "Pre-Release Preview" mode.
我已经试过了,效果很好,但请注意,它仍处于“预发布预览”模式。
According to the github repoit should enter Alpha in April 2015.
根据github repo,它应该在 2015 年 4 月进入 Alpha。
It can be installed with bower
它可以与凉亭一起安装
bower install ionic-material
bower install ionic-material
That's pretty much all you need to do, but be warned, there are bugs and the documentation is basically non-existent.
这几乎是您需要做的所有事情,但请注意,存在错误并且文档基本上不存在。
Good luck!
祝你好运!
回答by varna
Ionic Materialand Ionic Material Design Liteare two budding new libraries that aim to be an extension of ionic framework. Though a little immature, works well with ionic components and supports the material theming well.
Ionic Material和Ionic Material Design Lite是两个新兴的库,旨在成为 ionic 框架的扩展。虽然有点不成熟,但与离子组件配合得很好,并且很好地支持了材料主题。
Thisprobably could give more of an insight.
这可能会提供更多的洞察力。

