GithubHelp home page GithubHelp logo

devinscheung / angularfire-starter-template Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 140 KB

Angular 16 + Firebase CRUD starter template in latest version.

License: MIT License

TypeScript 21.13% HTML 78.61% CSS 0.27%
angular angularfire firebase firestore firestore-crud

angularfire-starter-template's Introduction

AngularFire Template

A ready-to-go CRUD template to kickstart your Angular and Firebase applications. This repo provides a solid foundation with a CRUD structure using AngularFire, enabling you to quickly move forward with your projects.

๐ŸŒŸ If you find this project helpful or useful, a click on star button would be much appreciated to show your support! :)

Features:

  • Angular 16
  • Pre-Built CRUD function template.
  • Easy setup and customization.
  • Error handling practices.

Section

Setup

Prerequisites

Getting Started

  1. Clone the repository to your local:
git clone https://github.com/cheungdevin/AngularFire-Template.git
cd AngularFire-Template
npm install
  1. After you "Register app" on firebase console, you can copy configuration into src/environments/environment.ts
export const environment = {
  firebase: {
    apiKey: '<your-key>',
    authDomain: '<your-project-authdomain>',
    databaseURL: '<your-database-URL>',
    projectId: '<your-project-id>',
    storageBucket: '<your-storage-bucket>',
    messagingSenderId: '<your-messaging-sender-id>'
  }
};
  1. Good to go:
ng serve

Testing

  1. Replace Your_Collection_Name in src/app/app.component.ts with one of your Firestore collection name.

  2. Navigate to http://localhost:4200/, ensure there are no console errors regarding Firestore connectivity.

Usage

  • The primary implementation of the CRUD template can be found in app/services/firebase.service.ts. Feel free to modify it according to your personal needs.
// Import the pre-built service template
import { FirebaseService } from './services/firebase.service';
// Inject FirebaseService in the constructor
constructor(private db:FirebaseService){}
// Fetch a document from a specific collection by calling getDocument
const data = await this.db.getDocument("Collection_Name","Collection_ID")

Version

Key dependencies used in this template:

Dependency Version
Angular 16.1.0
@angular/fire 7.6.1
rxfire 6.0.3

Resources

Contributing

Feel free to open issues and pull requests to make this template even better!

โญ๏ธ Don't forget to hit the star if you like this template, your support is greatly appreciated!

angularfire-starter-template's People

Contributors

devinscheung avatar

Stargazers

 avatar  avatar  avatar Tony DU avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.