本文整理匯總了TypeScript中angularfire2.AngularFire.list方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript AngularFire.list方法的具體用法?TypeScript AngularFire.list怎麽用?TypeScript AngularFire.list使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類angularfire2.AngularFire
的用法示例。
在下文中一共展示了AngularFire.list方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
af.auth.asObservable().filter(user => user !== null).subscribe(user => { // Skip null values
this.boardURL = 'users/' + user.uid + '/boards/' + routeParams.get('key');
this.board = af.object(this.boardURL);
this.lists = af.list(this.boardURL + '/lists', { query: { orderByChild: 'priority' } });
this.tasks = af.list(this.boardURL + '/tasks', { query: { orderByChild: 'priority' } });
this.listObservable = af.list(this.boardURL + '/lists');
this.taskObservable = af.list(this.boardURL + '/tasks');
});
示例2: getAllWorkouts
getAllWorkouts(callback = (workouts) => {}) {
let sub = this.af.list("/workouts/").subscribe((workouts) => {
sub.unsubscribe();
callback(workouts);
return;
});
}
示例3: constructor
constructor(private _nav: NavController, private _af: AngularFire, private _navParams: NavParams) {
this.charName = this._navParams.get('charName');
this.charID = this._navParams.get('charID');
this.dbURL = this._navParams.get('dbURL') + '/' + this.charID + '/sets';
this.sets = this._af.list(this.dbURL);
this.selSetFilter = 'incomplete';
}
示例4:
this._af.auth.subscribe((data) => {
if (data) {
this.userID = data.uid;
this.dbURL = "/" + this.userID;
this.characters = this._af.list(this.dbURL);
}
})
示例5: getAllAssignments
getAllAssignments(callback = (assignments) => {}) {
let sub = this.af.list("/assignments/").subscribe((assignments) => {
sub.unsubscribe();
callback(assignments);
return;
});
}
示例6:
get focusPhases$(): Observable<FocusPhase[] | any[]> {
if (this.authService.isLoggedIn()) {
return this.angularFire.list(`/users/${this.authUser.uid}/focusPhases`);
} else {
return Observable.of([]);
}
}
示例7: constructor
constructor(public af:AngularFire) {
var ref = new Firebase(rootFirebase);
ref.remove();
this.questions = af.list('/questions');
this.questions.add({question: 'why?'});
this.questions.add({question: 'how?'});
}
示例8: constructor
constructor(af: AngularFire, store: Store<AppState>) {
af.list('/events').do(data => {
store.dispatch({
type: 'RECEIVED_FROM_EVENTS',
payload: data,
});
}).subscribe();
}
示例9: constructor
constructor(af:AngularFire) {
this.people = af.list('/people')
.map(people => {
return people.map(person => {
person.todos = af.list(`/todos/${person.$key}`)
return person;
});
})
}
示例10: getAllTypes
getAllTypes(callback = (types) => {
}) {
let sub = this.af.list("/types/").subscribe((types) => {
// console.log("getting all Types");
sub.unsubscribe();
callback(types);
return;
});
}