我用约曼生成器在Angular 1.2.1中安装了Angular 1.2.1:
index.html
...
<!-- build:js scripts/modules.js -->
  <script src="bower_components/angularjs-geolocation/src/geolocation.js"></script>
  <script src="bower_components/angular-cookies/angular-cookies.js"></script>
  <script src="bower_components/angular-route/angular-route.js"></script>
  <script src="bower_components/angular-translate/angular-translate.js"></script>
  <script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
  <script src="bower_components/ngprogress/build/ngProgress.js"></script>
  <script src="bower_components/ngstorage/ngStorage.js"></script>
<!-- endbuild -->
...app.js:
...
angular.module('angularGeolocationApp', [
  'ngCookies',
  'ngRoute',
  'geolocation',
  'pascalprecht.translate',
  'ngProgress',
  'ngStorage',
  'ngSanitize'
])
...即使不注射$sanitize,我也能得到:

我遗漏了什么?
发布于 2013-12-06 20:13:00
$compile v1.2.3与AngularJS v1.2.1不兼容,$sanitize的最新版本(1.2.3)现在使用与$compile相同的机制来验证uris,uris使用的是只属于AngularJS v1.2.3和更高版本的新的私有服务$$sanitizeUri。有关更多信息,请参见此提交。
若要解决此问题,请安装角消毒v1.2.1或将AngularJS升级到1.2.3。
发布于 2013-12-06 18:39:39
看来您已经具备了毫无例外地运行所需的一切。我唯一能提出的建议是,在任何地方检查使用angular.module('angularGeolocationApp'...)的其他地方,以确保您不会意外地覆盖依赖项。只需确保只有一个实例定义了第二个参数。
https://stackoverflow.com/questions/20431134
复制相似问题