File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 1010
1111 angular . module ( 'firebase-example' , [ ] )
1212 . controller ( 'firebaseCtrl' , function ( $scope , $timeout ) {
13+ var fCtrl = this ;
14+
1315 $scope . add = function ( user ) {
1416 $scope . creating = true ;
1517 User . create ( user ) . then ( function ( ) {
1618 $scope . creating = false ;
19+ fCtrl . name = '' ;
1720 $timeout ( ) ;
1821 } , function ( ) {
1922 $scope . creating = false ;
Original file line number Diff line number Diff line change @@ -54,10 +54,13 @@ <h3 class="panel-title">Users</h3>
5454
5555angular.module('firebase-example', [])
5656 .controller('firebaseCtrl', function ($scope, $timeout) {
57+ var fCtrl = this;
58+
5759 $scope.add = function (user) {
5860 $scope.creating = true;
5961 User.create(user).then(function () {
6062 $scope.creating = false;
63+ fCtrl.name = '';
6164 $timeout();
6265 }, function () {
6366 $scope.creating = false;
You can’t perform that action at this time.
0 commit comments