I got this error when trying to write my code. I've been through the other Stackflow questions and can't find an answer. What is causing this error?
var app = angular.module("app", ['ui.router', 'ngTouch', 'ngMaterial', 'ngMessages', 'ngAnimate'])
app.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/category');
$stateProvider
.state('category', {
url: '/category',
templateUrl: '../../app/CategoryViewer/Category.html',
controller: 'CategoryController'
});
}]);
<head>
<title></title>
<link href="css/reset.css" rel="stylesheet" />
<link href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.5/angular-material.min.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://code.angularjs.org/1.5.0/angular.min.js"></script>
<script src="https://code.angularjs.org/1.5.0/angular-route.min.js"></script>
<script src="http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js"></script>
<script src="https://code.angularjs.org/1.5.0/angular-touch.min.js"></script>
<script src="https://code.angularjs.org/1.5.0/angular-messages.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.4/angular-material.min.js"></script>
<script src="app/app.js"></script>
<script src="app/directives.js"></script>
<script src="app/CategoryViewer/CategoryController.js"></script>
</head>
<body ng-app="app">
<div id="content" ui-view>hello</div>
</body>
Any help would be appreciated.
this is an injection problem, either injection into your controller / service or your app.
try removing each of these one at a time, does the problem go away?
var app = angular.module("app", ['ui.router', 'ngTouch', 'ngMaterial', 'ngMessages', 'ngAnimate'])
once you can narrow it down it will be easier to fix. Do the logs say which module it is having problems injecting?
i cant see a script tag for ng-animate
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With