材料设计中的输入不是主题
Inputs in material design are not themed
我有工作,按钮,购物车,列表,但我的输入不像这里的演示那样主题:https://material.angularjs.org/#/demo/material.components.input
现在我只是从演示中复制了代码,但它仍然不起作用。这是 html:
<div ng-controller="View1Ctrl" layout="column" md-theme="green">
<md-toolbar class="md-primary">
<h1 class="md-toolbar-tools">
Top Secret Project
</h1>
</md-toolbar>
<md-content class="md-padding">
<form name="projectForm">
<md-input-container>
<label>Description</label>
<input md-maxlength="30" required name="description" ng-model="project.description">
<div ng-messages="projectForm.description.$error">
<div ng-message="required">This is required.</div>
<div ng-message="md-maxlength">The name has to be less than 30 characters long.</div>
</div>
</md-input-container>
<md-input-container>
<label>Client Name</label>
<input required name="clientName" ng-model="project.clientName">
<div ng-messages="projectForm.clientName.$error">
<div ng-message="required">This is required.</div>
</div>
</md-input-container>
<md-input-container>
<label>Hourly Rate (USD)</label>
<input required type="number" step="any" name="rate" ng-model="project.rate" min="800" max="4999" required>
<div ng-messages="projectForm.rate.$error">
<div ng-message="required">You've got to charge something! You can't just <b>give away</b> a Missile Defense System.</div>
<div ng-message="min">You should charge at least $800 an hour. This job is a big deal... if you mess up, everyone dies!</div>
<div ng-message="max">$5,000 an hour? That's a little ridiculous. I doubt event Bill Clinton could afford that.</div>
</div>
</md-input-container>
</form>
</md-content>
</div>
和 js:
.controller('View1Ctrl', [function View1Controller() {
$scope.project = {
description: 'Nuclear Missile Defense System',
clientName: 'Bill Clinton',
rate: 500
};
}]);
结果:https://i.stack.imgur.com/FEwzD.png
我错过了什么?
我在 0.6 版中遇到了同样的问题
更新到主分支(当前为 0.7-rc3)确实解决了无法以材质样式显示的问题。
我没有搜索问题队列,但可能有答案/错误报告。
相关文章:
- 为什么不't Javascript对我的输入值进行了一些重新检查
- 可以't让我的if语句处理js中的html表单输入
- 名称输入的索引
- 如何编写HTML输入的JS内联
- 要求输入在数据列表中
- 将输入字段中的文本提交到我的数据库,同时将其添加到我的列表中
- 让文本输入幻灯片显示输入时的新文本输入?然后向后滑动
- 如何将输入(type=text)从html表单传递到javascript函数
- 单击jquery清除输入值
- 而循环只设置php中输入字段中的第一个值
- 在输入字段中将最小金额设置为
- jQuery自定义验证比较多个输入的序列
- 从 JS 更新角度材料输入值
- 材料设计中的输入不是主题
- 在角度材料对话框数据输入/推送后更新ng-repeat
- 角度材料芯片字段,用于从剩余输入的文本制作芯片
- 在输入时实现有角度的材料自动完成搜索
- 材料设计余烬输入绑定不工作
- 角度材料设计输入有效/无效
- 如何在 ng-2 材料
字段中修剪输入开头的空格