我正在开发一个 Angular Material 网站。在这里,我想要输入文本字段之前和文本字段之后的图标。 我所做的是
<div layout="row" layout-xs="column" md-whiteframe="1" layout-wrap layout-padding layout-fill class="littleWhiteFrameNoBorder" ng-cloak>
<div layout="row" flex="100">
<md-input-container flex="40">
<label>Search Keyword</label>
<md-icon md-font-icon="search"></md-icon>
<input ng-model="searchFilterCtrl.word">
</md-input-container>
<md-icon md-font-icon="search"></md-icon>
</div>
间距已创建,但我在文本字段之前和之后看不到任何图标。
最佳答案
Here's a pen 单击对话框按钮,您将看到一个表单,我希望它可以解决问题,或者您可以这样做,只是不要忘记包含上面评论中提到的样式表。
<md-input-container>
<label>Something</label>
<md-icon class="material-icons">search</md-icon>
<input type="text">
</md-input-container>
关于angularjs - md-icon 在文本字段内不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37206757/