I can't seem to find any documentation for how to use pipes outside of templates.. All the examples I have found on Angular's official docs are in .html {{ some | thing }} ... how can I transform a string variable in a class?
Asked
Active
Viewed 17 times
0
patrick
- 8,572
- 9
- 58
- 105
-
You can use constructor to include the pipe in TS and then call method `transform` on the pipe. ```name = this.upCasePipe.transform('angular'); constructor(private upCasePipe: UpCasePipe) {}``` – Joosep Parts Mar 04 '22 at 04:33