This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>Davis' Height</h1> | |
<p> | |
For the inches input, we do the following:<br /> | |
<ol> | |
<li>First, we remove the inches value converter. The canonical value is inches, so we don't need to convert | |
the value.</li> | |
<li>Next, we add a number value converter. Seems trivial, but this ensures that our value always comes back | |
from the view as a number. We could add this to the decimals value converter, except it might not be clear | |
how that would behave. Would it return a number of max precision, or of precision n?</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>Davis' Height</h1> | |
<p> | |
For the inches input, we do the following:<br /> | |
<ol> | |
<li>First, we remove the inches value converter. The canonical value is inches, so we don't need to convert | |
the value.</li> | |
<li>Next, we add a number value converter. Seems trivial, but this ensures that our value always comes back | |
from the view as a number. We could add this to the decimals value converter, except it might not be clear | |
how that would behave. Would it return a number of max precision, or of precision n?</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<!--<h1>Matt's Height</h1>--> | |
<!--<div><input type="number" value.bind="mattHeight | feet" /></div>--> | |
<!--<div><input type="number" value.bind="mattHeight | inches" /></div>--> | |
<!--<div>${mattHeight}</div>--> | |
<h1>Davis' Height</h1> | |
<div><input type="number" value.bind="davisHeight | inches" /></div> | |
<div><input type="number" value.bind="davisHeight | mm" /></div> | |
<div>${davisHeight}</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>Matt's Height</h1> | |
<div><input type="number" value.bind="mattHeight | feet" /></div> | |
<div><input type="number" value.bind="mattHeight | inches" /></div> | |
<div>${mattHeight}</div> | |
<h1>Davis' Height</h1> | |
<div><input type="number" value.bind="davisHeight | feet" /></div> | |
<div><input type="number" value.bind="davisHeight | inches" /></div> | |
<div>${davisHeight}</div> | |
</template> |