0

I am new to use angular.js.

I want to use gauge module ,but after i finish my html following Angular Gauge Document,it's not working(browser shows nothing). I guess the problem is i didnt make the module work. Can anybody tell me what is wrong with my code.

<!DOCTYPE HTML>
<html>
<body ng-app = "myApp">
<ng-gauge size="150" type="full" thick="5" 
      min="0" max="120" value="68.2" 
      cap="round" label="Speed" append="mph"
      foreground-color="#ffcc66" background-color="#EEE">
</ng-gauge>
</body>

<script src="http://cdn.static.runoob.com/libs/angular.js/1.6.4/angular.min.js"></script>
<script src="node_modules/angular/angular.min.js"></script>
<script src="node_modules/angular-gauge/dist/angularjs-gauge.min.js"></script>

<script>

angular.module('myApp', ['angularjs-gauge']);

</script>
</html>

Plus, in the document installation part,it says:

As soon as you've got all the files downloaded and included in your page you just need to declare a dependency on the chart.js module:

i didnt use chart.js module in my project,so which chart.js file this guide refer to ?

1 Answer 1

1

You need to include the script tags inside the body tag, also you included the angular.min.js twice.

<!DOCTYPE HTML>
<html>
<body ng-app = "myApp">
<ng-gauge size="150" type="full" thick="5" 
      min="0" max="120" value="68.2" 
      cap="round" label="Speed" append="mph"
      foreground-color="#ffcc66" background-color="#EEE">
</ng-gauge>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.min.js"></script>
<script src="https://rawgit.com/ashish-chopra/angular-gauge/master/src/angularjs-gauge.js"></script>

<script>

angular.module('myApp', ['angularjs-gauge']);

</script>
</body>

</html>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.