Practice Activity

Create a custom Pipe called CleanPipe for use in the Joke application which replaces instances of a bad word with $%#@! instead.

We want to pass into the pipe the list of bad words which we want replace, like so:

<p>{{data.punchline | clean:'boo,damn,hell'}}</p>

Steps

Fork this blitz:

Flesh out the CleanPipe class to implement the functionality.

Read any TODO comments in the blitz for hints.

Solution

When you are ready compare your answer to the solution in this blitz:


Caught a mistake or want to contribute to the book? Edit this page on GitHub!