[英]Angular 2 Material Design
I am learning Angular 2 and I have so many problems with that whose one I can't find anything on that on internet. 我正在学习Angular 2,我遇到了很多问题,而我在Angular 2上找不到任何东西。 So, I tried easy thing to start : create a sign in form in my app, so I am using Material Design but my input are bad and nothing like in the Material Design Doc.
因此,我尝试了一个简单的开始:在我的应用程序中创建一个登录表单,因此我使用的是Material Design,但我的输入内容不正确,与Material Design Doc中的内容完全不同。 Here so picture : enter image description here
这是图片: 在此处输入图片说明
So as you can see my input are not display and the placeholder is under it. 因此,如您所见,我的输入未显示,而占位符在其下方。
Here the code : 这里的代码:
<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>
What I missed ? 我错过了什么? Thank you so much.
非常感谢。
Elisa 伊丽莎
@NgModule({ ... imports: [MdInputModule], ... })
is added in angular module @NgModule({ ... imports: [MdInputModule], ... })
已添加到角度模块中 Let me know if you need any help . 让我知道您是否需要任何帮助。
You added the theme to your app.component.css
instead of the global style.css
file. 您将主题添加到了
app.component.css
而不是全局style.css
文件中。
More info about theming can be found here: https://material.angular.io/guide/theming 有关主题的更多信息,请参见: https : //material.angular.io/guide/theming
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.