I'm struggling to pass user input from a text box stored in $scope to a firebase query. Here's the code I have so far:
$scope.array = [];
$scope.addListItem = function(quote){
$scope.array.unshift(quote);
console.log(quote)
this.customQuote = null;
};
var prefix = 'tags/'
var userInput = console.log($scope.array)
var search = prefix + userInput
firebase.database().ref('products').orderByChild(search).equalTo(true).once('value', function(products)
Here's the corresponding HTML:
<form ng-submit="addListItem(customQuote)" name="customQuoteForm">
<div class="item item-input-inset">
<label class="item-input-wrapper">
<input type="text" placeholder="placeholder content" ng-model="customQuote" required>
</label>
<button class="button button-small" ng-disabled="customQuoteForm.$invalid">
Submit
</button>
</div>
</form>
Thank you for any help you can provide!