diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index 7436cb682a12..fe5c08f7e0ac 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -794,7 +794,8 @@ public static function isAjaxMode() { ) { return TRUE; } - return strpos(CRM_Utils_System::getUrlPath(), 'civicrm/ajax') === 0; + $url = CRM_Utils_System::getUrlPath(); + return (strpos($url, 'civicrm/ajax') === 0) || (strpos($url, 'civicrm/angular') === 0); } /** diff --git a/tests/phpunit/CRM/Core/ResourcesTest.php b/tests/phpunit/CRM/Core/ResourcesTest.php index 6b11ac2c370f..57c1675fdc2f 100644 --- a/tests/phpunit/CRM/Core/ResourcesTest.php +++ b/tests/phpunit/CRM/Core/ResourcesTest.php @@ -339,6 +339,7 @@ public function testIsAjaxMode($query, $result) { public function ajaxModeData() { return array( array(array('q' => 'civicrm/ajax/foo'), TRUE), + array(array('q' => 'civicrm/angularprofiles/template'), TRUE), array(array('q' => 'civicrm/test/page'), FALSE), array(array('q' => 'civicrm/test/page', 'snippet' => 'json'), TRUE), array(array('q' => 'civicrm/test/page', 'snippet' => 'foo'), FALSE),