user6934713 user6934713 - 2 years ago 145
AngularJS Question

Including angular material errors out

I have a quiz created with bootstrap that I am trying to convert to angular material. When I add the angular material everything errors out. Most likely I don't include it the right way. This is not the whole code just a short example.
Thank you in advance for the help.


.module("myApp", ['ngMaterial']);



.factory("quizMetrics", QuizMetrics);
QuizMetrics.$inject = ['DataService'];

And the HTML

<!DOCTYPE html>
<html lang="en" ng-app="myApp">
<meta charset="UTF-8">
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
<script src="js/app.js"></script>
<script src="js/test.js"></script>

Answer Source

I believe that you have to include the angular material js after the angular.min.js and as it uses some functions from there, also some additional libraries may be needed, according to their example you should have the following libraries defined:

<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>

See full example here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download