Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Multiple $firebase instances attached to same path do not trigger loaded event #194

@katowulf

Description

@katowulf

When two controllers access the same Firebase path, only the first $on('loaded', ...) handler gets fired.

This is due to the fact that locally cached data fires value events synchronously in Firebase. So on the first load, the server is contacted asynchronously by angularFire's _getInitialValue method.

However, on the second load, since the value is already local, the broadcast event happens synchronously, and therefore before your $on('loaded'...) handler gets attached.

See also: http://stackoverflow.com/questions/20768258/on-loaded-fires-once-for-new-references-firebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions