Answers.Body: <p>Here's the detailed steps I took to move the angular extension from an extension and into core.</p>
  
  <ol>
  <li><p>if your angular files are not already name spaced, they should be changed.  In the angularextension there should be a folder in ang/ named something similar to the module. Namespace this folder to crmModuleName. Outside of the crmModule folder, but inside the ang folder should be your css and the file that creates the module and has the router in it. Namespace these files to crmModuleName.css and crmModulename.js. </p></li>
  <li><p>Move the crmModulename folder and files to the ang/ folder in CiviCRM core. It should mimic the directory structure of your extension.</p></li>
  <li><p>There should be a file in the ang/ folder in your extension that is modulename.ang.php - it should have an array that points to where the files in your extension are located:</p>
  
  <pre><code>&lt;?php
  return array(
    'js' =&gt; array(
      0 =&gt; 'ang/crmModuleName.js',
      1 =&gt; 'ang/crmModuleName/*.js',
      2 =&gt; 'ang/crmModuleName/*/*.js',
    ),
    'css' =&gt; array(
      0 =&gt; 'ang/crmModuleName.css',
    ),
    'partials' =&gt; array(
      0 =&gt; 'ang/crmModuleName',
    ),
    'settings' =&gt; array(),
  );
  </code></pre></li>
  <li><p>Find the file Civi/Angular/Manage.php. Within the public function getModules put the information from modulename.ang.php. It should look like this:</p>
  
  <pre><code>$angularModules['modulename'] = array(
    'ext' =&gt; 'civicrm',
    'js' =&gt; array('ang/crmModuleName.js', 'ang/crmModuleName/*.js'),
    'css' =&gt; array('ang/crmModuleName.css'),
    'partials' =&gt; array('ang/crmModuleName'),
    'settings' =&gt; array(),
  );
  </code></pre></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-14T12:31:21.473Z
Answers.LastActivityDate: 2015-10-16T14:13:37.627Z
Answers.LastEditDate: 2015-10-16T14:13:37.627Z
Answers.UserDisplayName: jdax
Body: <p>I'm attempting to move code from an angular extension into core. I've created an ang/crmModuleName and moved the ctrl and partials into it, and crmModuleName.css into the ang/ and crmModuleName.js into the ang/. I've modified Civi/Angular/Manage.php to include js, css, partials, settings. Cleared cache on local server, but it is not working.</p>
  
  <p>Is there another step I've missed?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-13T15:58:40.593Z
Comments.Text: Yes, the main trick should be registering js, css, partials, and settings in Civi/Angular/Manage.php. I'd suggest posting a PR with a comment about the problem.
Comments.UserDisplayName: Tim Otten
Tags: <extension><developer><javascript>
Title: Moving Angular extension into /ang/
ThreadText: # Moving Angular extension into /ang/
  
  (Asked by: username_0 on 2015-10-13)
  
  I'm attempting to move code from an angular extension into core. I've created an ang/crmModuleName and moved the ctrl and partials into it, and crmModuleName.css into the ang/ and crmModuleName.js into the ang/. I've modified Civi/Angular/Manage.php to include js, css, partials, settings. Cleared cache on local server, but it is not working.
  
  Is there another step I've missed?
  
  **Tags:** extension, developer, javascript
  
  > **Comments:**
  > **username_1**: Yes, the main trick should be registering js, css, partials, and settings in Civi/Angular/Manage.php. I'd suggest posting a PR with a comment about the problem.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-10-14. Score: 3 | Accepted answer
  
  Here's the detailed steps I took to move the angular extension from an extension and into core.
  
  if your angular files are not already name spaced, they should be changed.  In the angularextension there should be a folder in ang/ named something similar to the module. Namespace this folder to crmModuleName. Outside of the crmModule folder, but inside the ang folder should be your css and the file that creates the module and has the router in it. Namespace these files to crmModuleName.css and crmModulename.js. 
  Move the crmModulename folder and files to the ang/ folder in CiviCRM core. It should mimic the directory structure of your extension.
  There should be a file in the ang/ folder in your extension that is modulename.ang.php - it should have an array that points to where the files in your extension are located:
   array(
      0 => 'ang/crmModuleName.js',
      1 => 'ang/crmModuleName/*.js',
      2 => 'ang/crmModuleName/*/*.js',
    ),
    'css' => array(
      0 => 'ang/crmModuleName.css',
    ),
    'partials' => array(
      0 => 'ang/crmModuleName',
    ),
    'settings' => array(),
  );
  
  Find the file Civi/Angular/Manage.php. Within the public function getModules put the information from modulename.ang.php. It should look like this:
  $angularModules['modulename'] = array(
    'ext' => 'civicrm',
    'js' => array('ang/crmModuleName.js', 'ang/crmModuleName/*.js'),
    'css' => array('ang/crmModuleName.css'),
    'partials' => array('ang/crmModuleName'),
    'settings' => array(),
  );
  
  
  ---
  
  