diff --git a/angularfire/angularfire-tests.ts b/angularfire/angularfire-tests.ts
index 231c0f992c..7d39e4181d 100644
--- a/angularfire/angularfire-tests.ts
+++ b/angularfire/angularfire-tests.ts
@@ -168,7 +168,7 @@ interface AngularFireAuthScope extends ng.IScope {
}
myapp.controller("MyAuthController", ["$scope", "$firebaseSimpleLogin",
- function ($scope: AngularFireAuthScope, $firebaseSimpleLogin: AngularFireAuthService) {
+ function($scope: AngularFireAuthScope, $firebaseSimpleLogin: AngularFireAuthService) {
var dataRef = new Firebase(url);
$scope.loginObj = $firebaseSimpleLogin(dataRef);
$scope.loginObj.$getCurrentUser().then(_ => {
@@ -178,9 +178,9 @@ myapp.controller("MyAuthController", ["$scope", "$firebaseSimpleLogin",
$scope.loginObj.$login('password', {
email: email,
password: password
- }).then(function (user) {
+ }).then(function(user) {
console.log('Logged in as: ', user.uid);
- }, function (error) {
+ }, function(error) {
console.error('Login failed: ', error);
});
$scope.loginObj.$logout();
diff --git a/angularfire/angularfire.d.ts b/angularfire/angularfire.d.ts
index b6a0d55d26..0bebb23c52 100644
--- a/angularfire/angularfire.d.ts
+++ b/angularfire/angularfire.d.ts
@@ -7,76 +7,76 @@
///
interface AngularFireService {
- (firebase: Firebase, config?: any): AngularFire;
+ (firebase: Firebase, config?: any): AngularFire;
}
interface AngularFire {
- $asArray(): AngularFireArray;
- $asObject(): AngularFireObject;
- $ref(): Firebase;
- $push(data: any): ng.IPromise;
- $set(key: string, data: any): ng.IPromise;
- $set(data: any): ng.IPromise;
- $remove(key?: string): ng.IPromise;
- $update(key: string, data: Object): ng.IPromise;
- $update(data: any): ng.IPromise;
- $transaction(updateFn: (currentData: any) => any, applyLocally?: boolean): ng.IPromise;
- $transaction(key:string, updateFn: (currentData: any) => any, applyLocally?: boolean): ng.IPromise;
+ $asArray(): AngularFireArray;
+ $asObject(): AngularFireObject;
+ $ref(): Firebase;
+ $push(data: any): ng.IPromise;
+ $set(key: string, data: any): ng.IPromise;
+ $set(data: any): ng.IPromise;
+ $remove(key?: string): ng.IPromise;
+ $update(key: string, data: Object): ng.IPromise;
+ $update(data: any): ng.IPromise;
+ $transaction(updateFn: (currentData: any) => any, applyLocally?: boolean): ng.IPromise;
+ $transaction(key:string, updateFn: (currentData: any) => any, applyLocally?: boolean): ng.IPromise;
}
interface AngularFireObject extends AngularFireSimpleObject {
- $id: string;
- $priority: number;
- $value: any;
- $save(): ng.IPromise;
- $loaded(resolve?: (x: AngularFireObject) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise;
- $loaded(resolve?: (x: AngularFireObject) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise;
- $loaded(resolve?: (x: AngularFireObject) => void, reject?: (err: any) => any): ng.IPromise;
- $inst(): AngularFire;
- $bindTo(scope: ng.IScope, varName: string): ng.IPromise;
- $watch(callback: Function, context?: any): Function;
- $destroy(): void;
+ $id: string;
+ $priority: number;
+ $value: any;
+ $save(): ng.IPromise;
+ $loaded(resolve?: (x: AngularFireObject) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise;
+ $loaded(resolve?: (x: AngularFireObject) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise;
+ $loaded(resolve?: (x: AngularFireObject) => void, reject?: (err: any) => any): ng.IPromise;
+ $inst(): AngularFire;
+ $bindTo(scope: ng.IScope, varName: string): ng.IPromise;
+ $watch(callback: Function, context?: any): Function;
+ $destroy(): void;
}
interface AngularFireObjectService {
- $extendFactory(ChildClass: Object, methods?: Object): Object;
+ $extendFactory(ChildClass: Object, methods?: Object): Object;
}
interface AngularFireArray extends Array {
- $add(newData: any): ng.IPromise;
- $save(recordOrIndex: any): ng.IPromise;
- $remove(recordOrIndex: any): ng.IPromise;
- $getRecord(key: string): AngularFireSimpleObject;
- $keyAt(recordOrIndex: any): string;
- $indexFor(key: string): number;
- $loaded(resolve?: (x: AngularFireArray) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise;
- $loaded(resolve?: (x: AngularFireArray) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise;
- $loaded(resolve?: (x: AngularFireArray) => void, reject?: (err: any) => any): ng.IPromise;
- $inst(): AngularFire;
- $watch(cb: (event: string, key: string, prevChild: string) => void, context?: any): Function;
- $destroy(): void;
+ $add(newData: any): ng.IPromise;
+ $save(recordOrIndex: any): ng.IPromise;
+ $remove(recordOrIndex: any): ng.IPromise;
+ $getRecord(key: string): AngularFireSimpleObject;
+ $keyAt(recordOrIndex: any): string;
+ $indexFor(key: string): number;
+ $loaded(resolve?: (x: AngularFireArray) => ng.IHttpPromise<{}>, reject?: (err: any) => any): ng.IPromise;
+ $loaded(resolve?: (x: AngularFireArray) => ng.IPromise<{}>, reject?: (err: any) => any): ng.IPromise;
+ $loaded(resolve?: (x: AngularFireArray) => void, reject?: (err: any) => any): ng.IPromise;
+ $inst(): AngularFire;
+ $watch(cb: (event: string, key: string, prevChild: string) => void, context?: any): Function;
+ $destroy(): void;
}
interface AngularFireArrayService {
- $extendFactory(ChildClass: Object, methods?: Object): Object;
+ $extendFactory(ChildClass: Object, methods?: Object): Object;
}
interface AngularFireSimpleObject {
- $id: string;
- $priority: number;
- $value: any;
- [key: string]: any;
+ $id: string;
+ $priority: number;
+ $value: any;
+ [key: string]: any;
}
interface AngularFireAuthService {
- (firebase: Firebase): AngularFireAuth;
+ (firebase: Firebase): AngularFireAuth;
}
interface AngularFireAuth {
- $getCurrentUser(): ng.IPromise;
- $login(provider: string, options?: Object): ng.IPromise;
- $logout(): void;
- $createUser(email: string, password: string): ng.IPromise;
- $changePassword(email: string, oldPassword: string, newPassword: string): ng.IPromise;
- $removeUser(email: string, password: string): ng.IPromise;
- $sendPasswordResetEmail(email: string): ng.IPromise;
+ $getCurrentUser(): ng.IPromise;
+ $login(provider: string, options?: Object): ng.IPromise;
+ $logout(): void;
+ $createUser(email: string, password: string): ng.IPromise;
+ $changePassword(email: string, oldPassword: string, newPassword: string): ng.IPromise;
+ $removeUser(email: string, password: string): ng.IPromise;
+ $sendPasswordResetEmail(email: string): ng.IPromise;
}