user978548
user978548

Reputation: 721

Transform value from input to model using Pipe

For instance, let's consider the following scenario:

Can I have a Pipe ( or something similar ) that transforms back the seconds into milliseconds ? A Pipe or something similar meaning NOT writing manually " on value change " handler methods in the component for each inputs

Upvotes: 0

Views: 1118

Answers (1)

user4676340
user4676340

Reputation:

Short answer, no.

If you want to convert your milliseconds to seconds from the model to the input, then yes, you can use a pipe. But if the user can change it, you will have to let go of the pipe, since pipes are used just to display values, and not to edit them.

Upvotes: 2

Related Questions