Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to instantiate module ionic-timepicker #42

Closed
ghost opened this issue Jul 29, 2015 · 7 comments
Closed

Failed to instantiate module ionic-timepicker #42

ghost opened this issue Jul 29, 2015 · 7 comments

Comments

@ghost
Copy link

ghost commented Jul 29, 2015

When I inject the dependency ionic-timepicker to the app module, it get this console error:
Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to: Error: [$injector:modulerr] Failed to instantiate module ionic-timepicker due to: Error: [$injector:nomod] Module 'ionic-timepicker' 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.3.13/$injector/nomod?p0=ionic-timepicker

And my whole app went blank... why is that?

@rajeshwarpatlolla
Copy link
Owner

Could you please check whether you have imported the ionic-timepicker.js file in the index.html? Also please cross check whether you have followed the instruction as per the description.

@ghost
Copy link
Author

ghost commented Jul 29, 2015

Yes I do have that, and I have followed each instruction in order as described...

@rajeshwarpatlolla
Copy link
Owner

Could you please test whether you have given the file path correctly? There are instances, where the bower components might be installed in to bower_components folder instead of lib folder. Also please re start the serve once. And also please cross check whether the file is loading or not in the Network tab of developer tools. You can search the file name there. If it is there, could you please confirm whether you are getting any errors on the console, except the previous one like file not found or some thing else?

@ghost
Copy link
Author

ghost commented Jul 29, 2015

I have restarted the serve and my computer as well...
The lib folder does contain the js files, and in the Network tab both js files are loaded with 304 status.
There are two errors on the console other than the one mentioned previously:
I got Uncaught ReferenceError: angular is not defined for each of the js files(templates and ionic-timepicker.js)

@rajeshwarpatlolla
Copy link
Owner

If you are getting the error Uncaught ReferenceError: angular is not defined, it means that angular is not yet available to ionic-timepicker. Please load the ionic-timepicker.js file after the ionic.bundle.min.js only. And also try changing the order of injection of ionic-timepicker after the ionic.

@ghost
Copy link
Author

ghost commented Jul 29, 2015

Oops...my bad. I had the incorrect order there...thanks for your help
The plugin works and looks excellent

@rajeshwarpatlolla
Copy link
Owner

Thanks for using it.

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

No branches or pull requests

1 participant