Reputation: 1597
I have done a sample app with angular js and added a ng-route to load html inside it.I am getting "angular.js:3905 Uncaught Error: [$injector:modulerr] Failed to instantiate module plunker due to:Error: [$injector:unpr] Unknown provider: $routeProvider"
Here is my HTML script that i have added where i have added route script inside
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<link data-require="[email protected]" data-semver="3.3.0" rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" />
<script data-require="[email protected]" src="https://code.angularjs.org/1.2.28/angular.js" data-semver="1.2.28"></script>
<script data-require="[email protected]" data-semver="1.2.28" src="https://code.angularjs.org/1.2.28/angular-route.js"></script>
<script data-require="[email protected]" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script data-require="[email protected]" data-semver="3.3.0" src="https://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="app.js"></script>
I have created a live demo of the problem here
Upvotes: 0
Views: 115
Reputation: 1665
Just add ngRoute dependency to your module
var app = angular.module('plunker', ['ngRoute']);
Upvotes: 1