Skip to content

Commit c3986c4

Browse files
committed
Update example.
1 parent b1eade8 commit c3986c4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

example/example.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
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;

example/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,13 @@ <h3 class="panel-title">Users</h3>
5454

5555
angular.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;

0 commit comments

Comments
 (0)