I know how to check device ready in jQuery. But it is bad practice to use jQuery along with Angular. So, I am planning not to use jQuery in Angular.
I want to test device ready event. In jQuery below code works:
<script type="text/javascript">
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
var deviceID = device.uuid;
$(document).ready(function() {
document.addEventListener("offline", onOffline, false);
});
function onOffline() {
location.href = "no_network.html";
}
}
</script>
How can I do the same in Angularjs?