These are examples of using a proposed hook_civicrm_angularMetadata($module, &$metadata)
.
The current $metadata
array is defined at https://github.com/civicrm/civicrm-core/blob/master/Civi/Angular/Page/Modules.php#L108
One of the examples uses phpQuery, which is a server-side variant of jQuery ( https://code.google.com/p/phpquery/ ). It includes functions for finding, inserting, replacing HTML content.