jadjoubran / laravel5-angular-material-starter

Get started with Laravel 5.3 and AngularJS (material)
https://laravel-angular.readme.io/
MIT License
1.66k stars 400 forks source link

How to use material angular paging #446

Closed mukhsin closed 7 years ago

mukhsin commented 7 years ago

Hi, I'm trying to use material angular paging from here.

I did bower install as the instruction given. I got a new folder inside bower_components and new line inside dependencies property of bower.json in the project folder.

I added a new dependency 'cl.paging' to module 'app.components'. Then I added some functionality as the instruction given. Everything worked fine after I ran gulp && gulp watch. But after I refreshed the page, the console showed me a very long error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to: Error: [$injector:modulerr] Failed to instantiate module app.components due to: Error: [$injector:modulerr] Failed to instantiate module cl.paging due to: Error: [$injector:nomod] Module 'cl.paging' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.5.9/$injector/nomod?p0=cl.paging at http://localhost:8000/build/js/final-4abf17157d.js:68:12 at http://localhost:8000/build/js/final-4abf17157d.js:2127:17 at ensure (http://localhost:8000/build/js/final-4abf17157d.js:2051:38) at module (http://localhost:8000/build/js/final-4abf17157d.js:2125:14) at http://localhost:8000/build/js/final-4abf17157d.js:4660:22 at forEach (http://localhost:8000/build/js/final-4abf17157d.js:325:20) at loadModules (http://localhost:8000/build/js/final-4abf17157d.js:4644:5) at http://localhost:8000/build/js/final-4abf17157d.js:4661:40 at forEach (http://localhost:8000/build/js/final-4abf17157d.js:325:20) at loadModules (http://localhost:8000/build/js/final-4abf17157d.js:4644:5)

How do I fix this error?

jadjoubran commented 7 years ago

Hi @mukhsin That's because of this issue stated here

keanass commented 7 years ago

same Error no solution in the other issue ! @jadjoubran

jadjoubran commented 7 years ago

Hi @keanass Yeah because there's an issue with the package you're trying to use

Try to add this to your bower.json and run gulp again

"overrides": {
    "material-angular-paging": {
      "main": ["build/dist.min.js"]
   }
}