Callable

  • app(name?: string):App
  • Retrieves a Firebaseapp instance.

    When called with no arguments, the default app is returned. When an app nameis provided, the app corresponding to that name is returned.

    An exception is thrown if the app being retrieved has not yet beeninitialized.

    example
    // Return the default appvar app = firebase.app();
    example
    // Return a named appvar otherApp = firebase.app("otherApp");

    Parameters

    • Optional name:string

      Optional name of the app to return. If no name isprovided, the default is"[DEFAULT]".

    ReturnsApp

    The app corresponding to the provided app name.If no app name is provided, the default app is returned.

Index

Interfaces

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-07-27 UTC.