Good morning from Canada. I am trying to create an extension with angularjs forms. I have followed the development guide and have created the angularjs page but I cannot get it to display in CiviCRM. I have a Tabset function used with Events, it calls the php page, which in turn I have the AngularLoader configuration. When it gets to the useApp() command I get an Unknown Path error. The examples in the doc don't go as far as to show how to do this within an extension or as a new tab under event. Even if you can point me to an example extension, I can analyse it to try and figure it out. The default_route value in the useApp() command I'm assuming is the ang entry in angular? When I do a cv ang:html:list the page I want is listed (as well as ang:module:list has the module). Thanks for any advance or help you can give. I ran all of the suggested civix commands from the documentation. From the php called from the extension: ...
$loader = new \Civi\Angular\AngularLoader();
$loader->setModules(array('trialadmin'));
$loader->setPageName('TrialDetails');
//$loader->useApp(['defaultRoute' => '/trialadmin']);
$loader->load();
parent::run();
And in my module I have
if ($eventID) {
$url = CRM_Utils_System::url( 'civicrm/event/manage/TrialAdmin', "reset=1&force=1&eventid=$eventID&snippet=5&angularDebug=1" );
error_log($url);
$tab['Administration'] = array(
'title' => "Administration",
'link' => $url,
'valid' => 1,
'active' => 1,
'current' => false,
);
output from cv ang:module:list trialadmin | civicrm/a | crmUi, crmUtil, ngRoute
output from cv ang:html:list trialadmin/TrialDetails.html
I've tried different arrangements of the defaultroute but I'm not clear on why I'm getting the unknown path error. If I comment out the useApp line it continues on to use the *.tpl that I originally had in place. I wanted to do this with the newer forms format rather than the quickforms as suggested in the docs.