Where can I put jquery "ready" function?

I’m new to ionic,I try to test sample project .

and I need to use jquery.
where can I put jquery “ready” function ?
app.js ?
controlers.js ?

is there a sample about this ?
thanks a lot !

this is and AngularJS topic!
i’d suggest you to read some intro to AngularJS!

(i bought this https://www.ng-book.com very good book… but there are tons of tutorials on AngularJS!)

1 Like

Hi there, not sure what you need it for, but you can also use ionic.DomUtil.ready(callback) or ionic.Platform.ready(callback).

ionic.DomUtil.ready will fire the callback once the document has loaded, and ionic.Platform.ready will fire once Cordova has loaded and the device is ready.

1 Like

hi Tim… where could we find the existence of this object?
aren’t there anywhere some autogenerated API?

thanks for the huge work!!

Yeah I just asked @adam about this, it’s not in the docs, but definitely should be!

The code is here: https://github.com/driftyco/ionic/blob/master/js/utils/dom.js

Auto-generated docs are on their way!

3 Likes