angularjs-template-patterns
Read-only mining codemod that scans AngularJS HTML templates and emits a template_pattern
metric describing legacy template patterns relevant to an Angular migration assessment. It
never modifies files — every match is reported via codemod:metrics and the transform always
returns null.
What it detects
| Pattern | Automation | Risk |
|---|---|---|
ng-repeat (incl. ng-repeat-start/-end) | full | low |
ng-if | full | low |
ng-switch / ng-switch-when / ng-switch-default | full | low |
ng-include with a static template URL (attribute or <ng-include> element) | partial | medium |
filter — {{ expr | someFilter }} interpolation | partial | medium |
one-time-binding — :: inside {{ }} or in a bare ng-* directive expression | full | low |
dynamic-template — ng-include whose template URL is a computed expression, not a literal | manual | high |
Metric cardinality
Each finding increments template_pattern with:
ts
Installation
bash
Development
bash
License
MIT