Where can I put jquery "ready" function?


#1

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 !


#2

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!)


#3

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.


#4

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

thanks for the huge work!!


#5

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


#6

Auto-generated docs are on their way!