Angular Js Of-Route
Angular Js Ng-Route
我已经用 angular js 完成了一个示例应用程序,并添加了一个 ng-route 以在 it.I 中加载 html 我得到 "angular.js:3905 Uncaught Error: [$injector:modulerr] Failed to instantiate module plunker due to:Error: [$injector:unpr] Unknown provider: $routeProvider"
这是我添加的HTML脚本,我在其中添加了路由脚本
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<link data-require="bootstrap@3.3.0" data-semver="3.3.0" rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" />
<script data-require="angular.js@1.2.x" src="https://code.angularjs.org/1.2.28/angular.js" data-semver="1.2.28"></script>
<script data-require="angular-route@1.2.28" data-semver="1.2.28" src="https://code.angularjs.org/1.2.28/angular-route.js"></script>
<script data-require="jquery@2.2.0" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script data-require="bootstrap@3.3.0" 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>
我已经创建了该问题的现场演示 here
只需将 ngRoute 依赖项添加到您的模块中
var app = angular.module('plunker', ['ngRoute']);
我已经用 angular js 完成了一个示例应用程序,并添加了一个 ng-route 以在 it.I 中加载 html 我得到 "angular.js:3905 Uncaught Error: [$injector:modulerr] Failed to instantiate module plunker due to:Error: [$injector:unpr] Unknown provider: $routeProvider"
这是我添加的HTML脚本,我在其中添加了路由脚本
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<link data-require="bootstrap@3.3.0" data-semver="3.3.0" rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" />
<script data-require="angular.js@1.2.x" src="https://code.angularjs.org/1.2.28/angular.js" data-semver="1.2.28"></script>
<script data-require="angular-route@1.2.28" data-semver="1.2.28" src="https://code.angularjs.org/1.2.28/angular-route.js"></script>
<script data-require="jquery@2.2.0" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script data-require="bootstrap@3.3.0" 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>
我已经创建了该问题的现场演示 here
只需将 ngRoute 依赖项添加到您的模块中
var app = angular.module('plunker', ['ngRoute']);