I am encountering an issue with a piece of code that involves checking if the value is null
or turnedoff
, then inserting a blank space
into the variable on the left-hand side. However, I have noticed that the turnedoff
value is not being replaced as expected. What could be causing this problem?
JavaScript Code:
$scope.ModelAux ={
ssclientID: sessionStorage.clientId === ('null' || 'turnedoff') ? '' : sessionStorage.clientId
};
alert($scope.ModelAux.ssclientID);
CSHTML Code:
<input type="text" name="clientID" class="form-control input-md" ng-model="ModelAux.ssclientID" required/>