1.0.8 • Published 7 years ago

vue-firebase v1.0.8

Weekly downloads
71
License
MIT
Repository
github
Last release
7 years ago

Dependencies

  • vue-router
  • firebase

Install

Step 1

npm install vue-firebase --save
or
yarn add vue-firebase

Step 2

add main.js

import * as firebase from "firebase";       
import VueFirebase from 'vue-firebase'
// Config firebase project
const FBCONFIG = {
    apiKey: "xxx",
    authDomain: "xxx",
    databaseURL: "xxx",
    projectId: "xxx",
    storageBucket: "xxx",
    messagingSenderId: "xxx"
};

Vue.use(VueFirebase, {firebase: firebase, config: FBCONFIG});

Component Injections

this.$firebase The firebase instance.

Easy check Auth routes

If you want to check the route, just add the meta and define the redirect

    {
        path: '/',
        name: 'Hello',
        component: HelloWorld
    },
    {
        path: '/test',
        name: 'Test',
        component: test,
        meta: { requiresAuth: false }
    },
    {
        path: '/dashboard',
        name: 'Dashboard',
        component: dashboard,
        meta: { requiresAuth: true, redirect: "/" }
    }
1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago