Skip to content

Commit

Permalink
Update README.md (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
psmyrdek committed Jan 3, 2019
1 parent 85f5c09 commit a8fc841
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Expand Up @@ -89,6 +89,25 @@ Prefixes cleanup:
'Alias for this' cleanup - ($ctrl, vm, etc.):
* `ng-hide="$ctrl.isHidden"` -> `[hidden]="isHidden"`

### Typescript integration

Starting from 1.1.0 it's easier to use this library inside of TypeScript projects - there's a dedicated file containing type definitions which can help you write typed code.

Example (.ts):

```
import {transformTemplate, TransformationOptions} from 'create-angular-template';
const template = '<div ng-if="$ctrl.isVisible"></div>';
const options: TransformationOptions = {
format: 'html',
aliasForThis: '$ctrl'
};
const transformed = transformTemplate(template, options);
```

### Would you like to see CLI here? Check Up!:

[ng-up](https://www.npmjs.com/package/ng-up) - Angular Upgrade Toolkit

0 comments on commit a8fc841

Please sign in to comment.