I am using ng-model to take is a string value and to output another to the a text area. Everything works fine in ionic serve in chrome with no error. When I build for ios or android there are no errors and both build successfully, but when I emulate it there is no output and the ng-model is not filling the text area. I can’t figure out what the issue is any suggestions?
model should be an object, maybe you used only a value
I am trying to run the following code. I allow the user to input a string SQL statement the use db.exec() to obtain the results. This works perfectly when I do ionic sever the result gets output to the screen. It does not work when emulated in either ios or android
<input type='text' ng-model="sql"></input>
<button ng-click="clickHandler(sql)"; class="button button-positive" id="execute">
Execute
</button>
<h3>SQL Results</h3>
<div class="card">
<div class="item item-text-wrap">
{{value}}
</div>
</div>
$scope.clickHandler = function(model) {
console.log(model);
try {
db.run(model);// Run the query without returning anything
console.log('The db.run test successfully read from file')
} catch (err) {
console.log("error at db.run initial: " + err);
}
console.log('I have made it to this point');
$scope.value = db.exec(model);
}