在材料设计输入没有主题 [英] Inputs in material design are not themed

查看:208
本文介绍了在材料设计输入没有主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有工作,按钮,车,列表,但我的投入并不像主题在这里演示:的 https://material.angularjs.org/#/demo/material.components.input

I've got working, buttons, carts, lists, but my inputs are not themed like in the demo here: https://material.angularjs.org/#/demo/material.components.input

现在,我只是照抄$ C $从演示C,但它仍然没有工作。这里是HTML:

Now I've simply copied code from demo, but it's still not working. Here is 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
        };

}]);

结果: http://i.imgur.com/DKsfZEJ.png

我是什么失踪?

推荐答案

我有同样的问题,释放0.6

I had the same problem with the release 0.6

更新到主分支(目前0.7 RC3)做了与没有被显示在材质款式解决问题。

Updating to the master branch (currently 0.7-rc3) did fix the issue with not being displayed in material style.

我没有搜索的问题队列,但可能有一个答案/ bug报告。

I did not search the issue queue, but there might be an answer/bug report.

这篇关于在材料设计输入没有主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆