How to use the angularfire2.defaultFirebase function in angularfire2

To help you get started, we’ve selected a few angularfire2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github weolopez / BraveHackersSpring2016 / app / app.ts View on Github external
defaultFirebase,
    AngularFire,
    firebaseAuthConfig,
    AuthProviders,
    AuthMethods
} from 'angularfire2';

@App({
    templateUrl: 'build/app.html',
    config: {}, // http://ionicframework.com/docs/v2/api/config/Config/ 
    providers: [
        Story,
        User,
        Beacons,
        FIREBASE_PROVIDERS,
        defaultFirebase('https://aofs.firebaseio.com/'),
        firebaseAuthConfig({
            provider: AuthProviders.Facebook,
            method: AuthMethods.Popup,
            remember: 'default',
            scope: ['email']
        })
    ]
})
class MyApp {
    // make HelloIonicPage the root (or first) page 
    rootPage: any = Start;
    pages: Array<{ title: string, component: any }>;

    constructor(
        private app: IonicApp,
        private platform: Platform,
github akserg / ionic2-firebase-webrtc / app / app.ts View on Github external
import {HomePage} from './pages/home/home';
import {TabsPage} from './pages/tabs/tabs';

import {FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthProviders, AuthMethods, FirebaseListObservable} from 'angularfire2';

import {UserService} from './common/user.service';
import {AuthService, User} from './common/auth.service';
import {WebRTCConfig} from './common/webrtc.config';
import {WebRTCService} from './common/webrtc.service';

@App({
    template: '',
    config: {}, // http://ionicframework.com/docs/v2/api/config/Config/
    providers: [
        FIREBASE_PROVIDERS,
        defaultFirebase('https://ng2-webrtc.firebaseio.com/'),
        firebaseAuthConfig({
            provider: AuthProviders.Google,
            method: AuthMethods.Popup,
            remember: 'default',
            scope: ['email']
        }),
        WebRTCConfig, UserService, AuthService, WebRTCService],
})
export class MyApp {
    // We show the fake page here and will change it after success authorization
    rootPage: any = HomePage;

    constructor(platform: Platform, webRTC: WebRTCService, authService:AuthService, userService:UserService) {
        platform.ready().then(() => {
            // Okay, so the platform is ready and our plugins are available.
            // Here you can do any higher level native things you might need.
github weolopez / BraveHackersSpring2016 / app / app.js View on Github external
import {App, IonicApp, Platform} from 'ionic/ionic';
import {HelloIonicPage} from './pages/hello-ionic/hello-ionic';
import {Game} from './pages/game/game';
import {Sensors} from './pages/sensors/sensors';
import {Video} from './pages/video/video';
import {Wikipedia} from './pages/wikipedia/wikipedia';
import {Wiki} from './wiki/wiki';
import {FirebaseUrl, FIREBASE_PROVIDERS, defaultFirebase} from 'angularfire2';

@App({
    templateUrl: 'build/app.html',
    config: {}, // http://ionicframework.com/docs/v2/api/config/Config/ 
    providers: [ 
        FIREBASE_PROVIDERS,
        defaultFirebase('https://yourpicks.firebaseio.com/') 
    ]
})
class MyApp {
    constructor(app: IonicApp, platform: Platform) {

        // set up our app
        this.app = app;
        this.platform = platform;
        this.initializeApp();

        // set our app's pages
        this.pages = [
            { title: 'Welcome', component: HelloIonicPage },
            { title: 'Game', component: Game },
            { title: 'Wikipedia', component: Wikipedia },
            { title: 'Video', component: Video },
github seiyria / deck.zone / src / bootstrap.js View on Github external
import { StorageSettings } from 'ng2-storage';
import { TOOLTIP_DIRECTIVES } from 'ng2-bootstrap/components/tooltip';

if(window.location.hostname !== 'localhost') enableProdMode();

bootstrap(App, [
  Title,
  TitleChangerService,
  NgStyle,
  Auth,
  ROUTER_PROVIDERS,
  FIREBASE_PROVIDERS,
  provide(StorageSettings, { useValue: { prefix: 'dz' } }),
  provide(PLATFORM_DIRECTIVES, { useValue: TOOLTIP_DIRECTIVES, multi: true }),
  provide(PLATFORM_DIRECTIVES, { useValue: FontAwesomeDirective, multi: true }),
  defaultFirebase('https://deckzone.firebaseio.com')
]);
github robwormald / fluent_demos / src / demos / firebase / firebasechat.ts View on Github external
import {AngularFire, defaultFirebase, FIREBASE_PROVIDERS, FirebaseListObservable} from 'angularfire2'


@Component({
  selector: 'firebase-demo',
  template: `
    <h2>firebase demo</h2>
    <input type="text">
    <button>send</button>
    <ul>
      <li>{{ message.text }}</li>
    </ul>
  `,
  providers: [
    FIREBASE_PROVIDERS,
    defaultFirebase('https://fluent-chat-demo.firebaseio.com/')
  ]
})
export class FirebaseChat {
  messages: FirebaseListObservable
  constructor(angularFire: AngularFire){
    this.messages = angularFire.list('/messages');
  }
  addMessage(el){
   
    let newMessage = {text: el.value};
    this.messages.add(newMessage);
    el.value = '';
  }
}
github angular / answers-app / src / shared-providers.ts View on Github external
import {provide} from 'angular2/core';
import {FIREBASE_PROVIDERS, defaultFirebase} from 'angularfire2';

import {AuthService} from './worker/services/Auth';
import {Backend, BackendConfig} from './worker/services/Backend';
import {QuestionService} from './worker/services/QuestionService';


export const SHARED_PROVIDERS = [
  AuthService,
  QuestionService,
  FIREBASE_PROVIDERS,
  defaultFirebase('answers-mobile.firebaseio.com')
];