让 justgage 与 angular material 一起工作

Getting justgage to work with angular material

我正试图让 Gage 与 angular material 一起工作。我已按照 just gage 站点中提供的设置说明进行操作。下面是码笔link。想知道我哪里出错了。

<div id="gauge" class="200x160px"></div>
<script>
  var g = new JustGage({
    id: "gauge",
    value: 67,
    min: 0,
    max: 100,
    title: "Visitors"
  });
    </script>

http://codepen.io/anon/pen/JKWORP

由于@camdem_kid 在评论中发帖,您的codepen 显示了很多错误。因此,我决定从头开始创建一个 plunker,您可以在其中看到 angular-materialjustgage.

一起工作

See working plunker

仅供参考(完整详情请查看plunker)

<html>

<head>
  <link rel="stylesheet" href="https://rawgit.com/angular/bower-material/master/angular-material.css">

  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-animate.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-aria.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-messages.min.js"></script>

  <script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0-rc2/angular-material.min.js"></script>
  <script src="script.js"></script>

  <script src="raphael-2.1.4.min.js"></script>
  <script src="justgage.js"></script>

</head>

<body ng-app="YourApp" class="main_content">

  <div id="gauge" class="200x160px"></div>

  <div ng-controller="TestCtrl">
    <md-button class="md-raised">Hello</md-button>
  </div>

  <script>
    var g = new JustGage({
      id: "gauge",
      value: 67,
      min: 0,
      max: 100,
      title: "Visitors"
    });
  </script>

</body>

</html>

希望对您有所帮助。