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
Post a Comment