4

I am using blur-admin theme and trying to add ngInfiniteScroll to it. By doing

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

I use --force because without it I was getting.

ECONFLICT Unable to find suitable version for angular

with --force the dependency is installed but on theme load its giving error.

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

my 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"
  }
}

Can anybody help me?
Thanks

Community
  • 1
  • 1
codegasmer
  • 1,304
  • 1
  • 12
  • 40

1 Answers1

2

The ng-infinite-scroll package on Bower is not the one you're expecting - it's actually this package that was last updated in 2014.

The correct package is ngInfiniteScroll for Bower, or ng-infinite-scroll for npm.

approxiblue
  • 6,624
  • 16
  • 47
  • 56
Aurora0001
  • 10,827
  • 5
  • 47
  • 50
  • so should I install it from `npm install --save ng-infinite-scroll` and add `infinite-scroll` to my dependency? – codegasmer Jul 30 '16 at 10:12
  • Yes, that should work fine. You may need to import the `ngInfiniteScroll` file using either ES6's `import` keyword, `require` or just a ` – Aurora0001 Jul 30 '16 at 10:15
  • Can you link me through its bower install it would be a great help? – codegasmer Jul 30 '16 at 10:54
  • The bower package is `ng-infinite-scroller-origin`. – Aurora0001 Jul 30 '16 at 11:00
  • Thanks! I downloaded that version, however I can't minimize their source js file, anyone else run into this problem? – Leon Gaban Oct 27 '16 at 15:34
  • @LeonGaban, I've not heard of that issue. It might be worth creating a new question for that with all of the details (e.g. the minifier that you're using, any error messages, etc.) since I doubt it'll be possible to figure out what's wrong through the questions. If you reply to this comment with the link to your question, I'll have a look and try to help. – Aurora0001 Oct 27 '16 at 16:50
  • 1
    @Aurora Ah never mind, I found out that I have to use the npm version, and have webpack require it etc etc... it was just more work than I wanted to do, just ended up coding my own infinite scroll. Just too much of a hassle to get it setup. – Leon Gaban Oct 27 '16 at 19:55
  • @LeonGaban, fair enough, glad you got it sorted. If you do ever decide to use the library and figure out a way, you can always share it on here. – Aurora0001 Oct 27 '16 at 20:03