angularjs - Clearing input field on firebase function after angular submit -


the function works , submits user input firebase "back-end" cannot figure out clear function empty out input field after using ng-submit. input tied var "emailinput" ng-model. suggestions!

var newemailref = new firebase("https://nevermind.com"); $scope.email = $firebasearray(newemailref); $scope.addemail = function(email) {     $scope.email.$add(email);     $scope.emailinput = ''; }; 

i needed assign key email input , empty object.

$scope.emailinput = {}; var newemailref = new firebase("https://archerthedog.firebaseio.com/email");     $scope.email = $firebasearray(newemailref);     $scope.addemail = function(email) {         $scope.email.$add(email);         $scope.emailinput = {};     }; 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -