I am writing a Single Page Frontend to a Drupal backend using AngularJS.
It is basically a module that bootstraps the Single Page Application.
HOWEVER, because the application takes control over the URL routing, I can no longer access the admin/.
Hence, ideally I would just like to bootstrap the App on the root url and not if the requested url is admin/ etc.
Can I set this up using a module hook or how can I achieve this?
EDIT
As Clive pointed out one can use !path_is_admin(current_path()).
Follow up: How can admin theme be loaded in the else clause?
if (!path_is_admin(current_path())) {
return array(
'html' => array(
'render element' => 'page',
'template' => 'htmlui',
),
);
}
else{
//LOAD ADMIN THEME HERE?
}