spring mvc - Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.16 -
as add line
<html lang="en" ng-app="myapp">
i getting error
uncaught error: [$injector:modulerr] http://errors.angularjs.org/1.2.16/$injector/modulerr?p0=mctapp&p1=error%3a…rg%2f1.2.16%2f%24injector%2fnomod%3fp0%3dmctapp%0a%20%20%20%20at%20error%2...<omitted>...1)
i have added these scripts
<script type="text/javascript" src="/resources/js/lib/angular.min.js"></script> <script type="text/javascript" src="/resources/js/lib/angular-route.min.js"></script> <script type="text/javascript" src="/resources/js/lib/angular-resource.min.js"></script>
javascript app code
angular.module('myapp', []).config(mctrouter); function mctrouter($routeprovider) { $routeprovider .when('/', { templateurl: 'home.jsp' }); }
you forgot inject ngroute
app. inject like
angular.module('myapp', ['ngroute']).config(mctrouter);
Comments
Post a Comment