ng-infinite-scroll.js:42未捕获的ReferenceError:app未定义

时间:2016-07-30 09:47:20

标签: angularjs npm dependencies bower nginfinitescroll

我正在使用blur-admin主题并尝试向其添加ngInfiniteScroll。通过做

 bower install ng-infinite-scroll --save --force

我使用--force,因为没有它我就得到了。

ECONFLICT Unable to find suitable version for angular

使用--force安装了依赖项,但在主题加载时给出了错误。

ng-infinite-scroll.js:42 Uncaught ReferenceError: app is not defined

我的 bower.json

{
  "name": "blur-admin",
  "version": "1.2.0",
  "homepage": "https://github.com/1itvinka/blur-admin",
  "authors": [
    "akveo"
  ],
  "description": "Blur Admin HTML template",
  "license": "MIT",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "Chart.js": "~1.0.2",
    "Ionicons": "ionicons#~2.0.1",
    "amcharts": "~3.15.2",
    "amcharts-stock": "*",
    "ammap": "~3.14.5",
    "angular": "~1.4.8",
    "angular-route": "~1.4.6",
    "angular-slimscroll": "~1.1.5",
    "angular-smart-table": "~2.1.3",
    "angular-toastr": "~1.7.0",
    "angular-touch": "~1.4.6",
    "angular-ui-sortable": "~0.13.4",
    "animate.css": "~3.4.0",
    "bootstrap": "~3.3.5",
    "bootstrap-select": "~1.9.3",
    "bootstrap-switch": "~3.3.2",
    "bootstrap-tagsinput": "~0.5.0",
    "font-awesome": "fontawesome#~4.4.0",
    "fullcalendar": "~2.4.0",
    "highlight": "~8.8.0",
    "jquery": "~2.1.4",
    "jquery-ui": "~1.11.4",
    "jquery.easing": "~1.3.1",
    "jquery.easy-pie-chart": "~2.1.6",
    "leaflet": "~0.7.5",
    "moment": "~2.10.6",
    "slimScroll": "jquery-slimscroll#~1.3.6",
    "angular-progress-button-styles": "~0.1.0",
    "angular-ui-router": "~0.2.16",
    "angular-chart.js": "~0.8.8",
    "angular-chartist.js": "~3.3.12",
    "chartist": "0.9.5",
    "angular-morris-chart": "~1.1.0",
    "ionrangeslider": "~2.1.2",
    "angular-bootstrap": "~1.3.3",
    "angular-animate": "~1.4.8",
    "textAngular": "~1.4.6",
    "angular-xeditable": "~0.1.9",
    "ng-js-tree": "~0.0.7",
    "ngstorage": "^0.3.10",
    "restangular": "^1.5.2",
    "ng-file-upload": "^12.0.4",
    "ng-infinite-scroll": "^0.0.1"
  },
  "overrides": {
    "amcharts": {
      "main": [
        "./dist/amcharts/amcharts.js",
        "./dist/amcharts/plugins/responsive/responsive.min.js",
        "./dist/amcharts/serial.js",
        "./dist/amcharts/funnel.js",
        "./dist/amcharts/pie.js",
        "./dist/amcharts/gantt.js"
      ]
    },
    "amcharts-stock": {
      "main": "./dist/amcharts/amstock.js"
    },
    "ammap": {
      "main": [
        "./dist/ammap/ammap.js",
        "./dist/ammap/maps/js/worldLow.js"
      ]
    },
    "bootstrap": {
      "main": [
        "dist/css/bootstrap.css",
        "js/dropdown.js"
      ]
    },
    "slimScroll": {
      "main": "./jquery.slimscroll.js"
    },
    "font-awesome": {
      "main": [
        "css/font-awesome.css",
        "fonts/FontAwesome.otf",
        "fonts/fontawesome-webfont.eot",
        "fonts/fontawesome-webfont.svg",
        "fonts/fontawesome-webfont.ttf",
        "fonts/fontawesome-webfont.woff",
        "fonts/fontawesome-webfont.woff2"
      ]
    }
  },
  "resolutions": {
    "angular": "~1.x"
  }
}

有人可以帮帮我吗? 感谢

1 个答案:

答案 0 :(得分:2)

Bower上的ng-infinite-scroll软件包 是您期望的软件包 - 它实际上是this package,是2014年的最后一次更新。

正确的包裹为ngInfiniteScroll for Bower,或ng-infinite-scroll为npm。