Skip to content
Snippets Groups Projects
Commit 8558fef5 authored by colemanw's avatar colemanw Committed by colemanw
Browse files

Create hook_civicrm_alterAngular.md

See https://github.com/civicrm/civicrm-core/pull/10085
@totten I've added docs for this hook.
parent e063f0fd
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,11 @@ independent deployments with independent configurations).
...
## tldr
## Hooks
* **[hook_civicrm_alterAngular](/hooks/hook_civicrm_alterAngular.md)** - Alter the definition of some Angular HTML partials.
## Example
```php
function mailwords_civicrm_alterAngular(\Civi\Angular\Manager $angular) {
......
# hook_civicrm_alterAngular
## Summary
Alter the definition of some Angular HTML partials; allows the injection of [Changesets](/framework/angular/changeset/).
## Availability
This hook is available in CiviCRM 4.7.21 and later.
## Definition
hook_civicrm_alterAngular(&$angular)
## Parameters
- array `$angular` - `\Civi\Angular\Manager`
## Example
```php
function example_civicrm_alterAngular($angular) {
$angular->add(\Civi\Angular\ChangeSet::create('mychanges')
->alterHtml('~/crmMailing/EditMailingCtrl/2step.html', function(phpQueryObject $doc) {
$doc->find('[ng-form="crmMailingSubform"]')->attr('cat-stevens', 'ts(\'wild world\')');
})
);
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment