[英]Material Design (AngularJS) <md-select> not working
I am trying to use the <md-select>
tag but I can't have the same result as in here . 我正在尝试使用
<md-select>
标记,但无法获得与此处相同的结果。
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. 其他Material Design元素运行正常,只有
<md-select>
标记似乎无效。 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. 当我使用默认的
<select>
和<option>
标记时,它可以工作,但我确实想使用Material Design的材料。
I've put up this http://codepen.io/anon/pen/JowXQy referencing the latest libraries through RawGit, and it's working fine. 我已经通过RawGit引用了http://codepen.io/anon/pen/JowXQy这个最新的库,它工作正常。
I've tried also with the stable ones, from ajax.googleapis.com/ajax/libs/ , but the md-select didn't get created. 我也尝试过ajax.googleapis.com/ajax/libs/中的稳定版本,但没有创建md-select。 So, it seems to be some kind of libs version problem.
因此,这似乎是某种libs版本问题。
<!-- Angulars Material CSS using RawGit to load directly from `bower-material/master` -->
<link rel="stylesheet" href="https://rawgit.com/angular/bower-material/master/angular-material.css">
<!-- Angular Material Dependencies -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-animate.js"></script>
<script src="https://ajax.googleapis.com/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.com/angular/bower-material/master/angular-material.js"></script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.