I want to make a custom pipe for my angular 4 application, but all of the resources I've found only show how to make pipes in TypeScript. I have to use JavaScript. Can anyone explain how to do this in JavaScript?
found it. From https://angular.io/docs/ts/latest/cookbook/ts-to-js.html
app.MyPipe = ng.core.Pipe({
name: 'myPipe'
}).Class({
constructor: function () {
}, transform: function (input) {
return input ? 'Yep' : 'Oh, I don't think so';
}
});