Commit | Line | Data |
---|---|---|
e7ff7042 | 1 | <?php |
39c3d5e9 | 2 | namespace Civi\Angular\Page; |
e7ff7042 TO |
3 | |
4 | /** | |
5 | * This page is simply a container; any Angular modules defined by CiviCRM (or by CiviCRM extensions) | |
6 | * will be activated on this page. | |
7 | * | |
8 | * @link https://issues.civicrm.org/jira/browse/CRM-14479 | |
9 | */ | |
39c3d5e9 | 10 | class Main extends \CRM_Core_Page { |
b20ea913 | 11 | |
e7ff7042 | 12 | /** |
f5c157f5 | 13 | * Run the page |
b5c2afd0 | 14 | */ |
00be9182 | 15 | public function run() { |
6aeeacaf | 16 | $this->registerResources(); |
4b07d5bd TO |
17 | return parent::run(); |
18 | } | |
19 | ||
a0ee3941 | 20 | /** |
2f6c50d5 | 21 | * Register resources required by Angular. |
a0ee3941 | 22 | */ |
6aeeacaf | 23 | public function registerResources() { |
f5c157f5 | 24 | $loader = \Civi::service('angularjs.loader'); |
c64f69d9 | 25 | $loader->useApp([ |
3e8823e3 TO |
26 | 'activeRoute' => \CRM_Utils_Request::retrieve('route', 'String'), |
27 | 'defaultRoute' => NULL, | |
c64f69d9 | 28 | ]); |
fe158128 TO |
29 | } |
30 | ||
b5c2afd0 | 31 | } |