簡體   English   中英

Angular 2材質設計

[英]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> 

我錯過了什么? 非常感謝。

伊麗莎

  1. 確保遵循入門步驟,並且
  2. @NgModule({ ... imports: [MdInputModule], ... })已添加到角度模塊中

讓我知道您是否需要任何幫助。

您將主題添加到了app.component.css而不是全局style.css文件中。

有關主題的更多信息,請參見: https//material.angular.io/guide/theming

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM