silverbux / laravel-angular-admin

Laravel + Angularjs + Bootstrap + AdminLTE binded by Gulp workflow Admin Dashboard Boilerplate / Starter.
http://silverbux.github.io/laravel-angular-admin/
MIT License
924 stars 414 forks source link

can't use new module #54

Closed filmsklz closed 8 years ago

filmsklz commented 8 years ago

I can not use 'chart.js' . I am install chart.js with bower and add it like this " angular.module('app.components', ['chart.js']) " when refresh my site, show errors

angular.js:68Uncaught 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 chart.js due to: Error: [$injector:nomod] Module 'chart.js' 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.

how can i fix this problem ? thank you

ixperiencenl commented 8 years ago

Hi filmsklz, in the default package, chart is already included. It's also already in the index.modules.js file added like angular.module('app.components'),['chart.js', etc etc])

To add it into your component, add chart to your constructor.

filmsklz commented 8 years ago

When i want to import other module with bower ,What should I do ? Now i'm add package name into angular.module('app.components') but can not working. (in laravel5-angular-material-starter)

silverbux commented 8 years ago

hi @filmsklz you're probably missing angular-chart.js in your bower.json see bower.json#L24. update your file and do a bower install

filmsklz commented 8 years ago

Thank you ,The problem is solved.

donadoniman commented 6 years ago

how can i enable select2 or datetimepicker on my project

donadoniman commented 6 years ago

may i know the steps to add new modules from bower_components