Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

can't use new module #54

Closed
filmsklz opened this issue Jul 8, 2016 · 6 comments
Closed

can't use new module #54

filmsklz opened this issue Jul 8, 2016 · 6 comments

Comments

@filmsklz
Copy link

filmsklz commented Jul 8, 2016

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
Copy link

ixperiencenl commented Jul 8, 2016

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
Copy link
Author

filmsklz commented Jul 8, 2016

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
Copy link
Owner

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
Copy link
Author

filmsklz commented Jul 9, 2016

Thank you ,The problem is solved.

@filmsklz filmsklz closed this as completed Jul 9, 2016
@filmsklz filmsklz reopened this Jul 11, 2016
@donadoniman
Copy link

how can i enable select2 or datetimepicker on my project

@donadoniman
Copy link

may i know the steps to add new modules from bower_components

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants