I have a text box that passes the user input into a $scope. I need to pass this further along into a firebase query, but im having trouble getting the variable to register the input stored in $scope. Code:
$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)
And the 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>
Thanks in advance!