Added ui.navigate js method to simplify 'location.href=??' code