Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20981

Allow custom base-pages with less `crmApp` boilerplate

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.24
    • Fix Version/s: 5.1
    • Component/s: Core CiviCRM
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      The AngularLoader is a helper class for setting up a custom Angular base-page.

      https://docs.civicrm.org/dev/en/master/framework/angular/loader/#other-base-pages

      The pages "civicrm/a", "civicrm/case/a", and "civicrm/vol" all have similar requirements for how they load (e.g. they only load Angular, and it's the main content of the page). But there's little explanation/documentation/tooling for handling Angular bootstrap (`<div ng-app>` or `angular.bootstrap()`) in this case.

      We should add and document a helper function to `AngularLoader()` which addresses this common case.

      NOTE: This would not be universally applicable. For example, CiviCase injects Angular into a subsection of an existing screen ("View Contact"), and that requires a somewhat different approach. So it should be optional.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: