In an index.cshtml I have the following working code similar to:
<script type="text/javascript">
if ('@Model.SomeCondition' === 'True'){
Do Something();
}
</script>
The === 'True' seems like an odd hack to me to force Razor and JavaScript to get along. How can I refactor to use === true? This doesn't give the same result. Can this be done with Razor and JavaScript?
data-*attributes.