[英]Angular 2 Material Design
我正在学习Angular 2,我遇到了很多问题,而我在Angular 2上找不到任何东西。 因此,我尝试了一个简单的开始:在我的应用程序中创建一个登录表单,因此我使用的是Material Design,但我的输入内容不正确,与Material Design Doc中的内容完全不同。 这是图片: 在此处输入图片说明
因此,如您所见,我的输入未显示,而占位符在其下方。
这里的代码:
<form > <md-input-container> <input mdInput type="email" placeholder="Email" > </md-input-container> <md-input-container> <input mdInput type="password" placeholder="Mot de passe" > </md-input-container> <button md-button type="submit" >Se connecter</button> </form>
我错过了什么? 非常感谢。
伊丽莎
@NgModule({ ... imports: [MdInputModule], ... })
已添加到角度模块中 让我知道您是否需要任何帮助。
您将主题添加到了app.component.css
而不是全局style.css
文件中。
有关主题的更多信息,请参见: https : //material.angular.io/guide/theming
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.