最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Material Design (AngularJS) <md-select> not working - Stack Overflow

programmeradmin5浏览0评论

I am trying to use the <md-select> tag but I can't have the same result as in here.

I am writing this code:

<div layout="column" layout-align="center center" style="margin: 0px 10px 0px 5px;">
  <h1 class="nomargin">X</h1>
  <p class="unit normagin">milimeter</p>
</div>
<div>
  <md-select ng-model="motion.someVal0">
    <md-option value="1">Move Absolute</md-option>
    <md-option value="2">Move Relative</md-option>
    <md-option value="3">Jog</md-option>
  </md-select>
</div>

But the result that I get is this:

The other Material Design elements is working just fine, only the <md-select> tag that seems to not work. I have already tried to read the docs here but it is so simple that I don't understand why is not working.

When I use the default <select> and <option> tags it works but I really want to use the Material Design ones.

I am trying to use the <md-select> tag but I can't have the same result as in here.

I am writing this code:

<div layout="column" layout-align="center center" style="margin: 0px 10px 0px 5px;">
  <h1 class="nomargin">X</h1>
  <p class="unit normagin">milimeter</p>
</div>
<div>
  <md-select ng-model="motion.someVal0">
    <md-option value="1">Move Absolute</md-option>
    <md-option value="2">Move Relative</md-option>
    <md-option value="3">Jog</md-option>
  </md-select>
</div>

But the result that I get is this:

The other Material Design elements is working just fine, only the <md-select> tag that seems to not work. I have already tried to read the docs here but it is so simple that I don't understand why is not working.

When I use the default <select> and <option> tags it works but I really want to use the Material Design ones.

Share Improve this question asked Mar 19, 2015 at 9:54 Hugo NakamuraHugo Nakamura 4832 gold badges7 silver badges20 bronze badges 3
  • What does you console say? – Michelangelo Commented Mar 19, 2015 at 10:00
  • By console you mean The F12 - Console tab in browser? If then: GET http://127.0.0.1:49823/bootstrap/bootstrap.css.map 404 (Not Found) But I don't think this is relevant because when I use the default <select> tag I also get this error. – Hugo Nakamura Commented Mar 19, 2015 at 10:17
  • Ok no you are right that is not a problem. – Michelangelo Commented Mar 19, 2015 at 12:01
Add a ment  | 

1 Answer 1

Reset to default 6

I've put up this http://codepen.io/anon/pen/JowXQy referencing the latest libraries through RawGit, and it's working fine.

I've tried also with the stable ones, from ajax.googleapis./ajax/libs/ , but the md-select didn't get created. So, it seems to be some kind of libs version problem.

<!-- Angulars Material CSS using RawGit to load directly from `bower-material/master` -->
<link rel="stylesheet" href="https://rawgit./angular/bower-material/master/angular-material.css">

<!-- Angular Material Dependencies -->
<script src="https://ajax.googleapis./ajax/libs/angularjs/1.3.6/angular.js"></script>
<script src="https://ajax.googleapis./ajax/libs/angularjs/1.3.6/angular-animate.js"></script>
<script src="https://ajax.googleapis./ajax/libs/angularjs/1.3.6/angular-aria.js"></script>

<!-- Angular Material Javascript using RawGit to load directly from `bower-material/master` -->
<script src="https://rawgit./angular/bower-material/master/angular-material.js"></script>

发布评论

评论列表(0)

  1. 暂无评论