A site locator application built using angular 7 (2+) and firebase.
Install Angular CLI tools
npm install -g @angular/cliCreate a new Angular application named angular-locus
ng new angular-locusAdd PWA (Progressive Web Application) support
ng add @angular/pwa --project=angular-locusThis will add necessary configurations to your angular application to enable PWA functionalities and features
Add/Replace necessary configurations on generated manifest.json
Add Angular Material module
ng add @angular/materialAdd Bootstrap, Popper.JS and Jquery
npm install bootstrap popper.js jquery --saveInstall Angular Google Maps
npm install @agm/core --saveRefer Angular Google Maps
Get your Google Maps API from developer console and replace it in both environment and environment.prod scripts
export const environment = {
production: false,
googleMapsApiKey: 'YOUR_API_KEY'
};Install Firebase CLI tools
npm install -g firebase-toolsLogin to your Firebase account
firebase loginAnd enter your credentials. and after that initialize firebase configuration inside your project
firebase initInstall firebase dependencies for angular
npm install --save @angular/fire firebaseCreate a project in Firebase and replace the api keys in both environment and environment.prod scripts
export const environment = {
production: false,
googleMapsApiKey: 'YOUR_API_KEY',
firebaseConfig: {
apiKey: 'YOUR_API_KEY',
authDomain: 'YOUR_AUTH_DOMAIN',
databaseURL: 'YOUR_DATABASE_URL',
projectId: 'YOUR_PROJECT_ID',
storageBucket: 'YOUR_STORAGE_BUCKET',
messagingSenderId: 'YOUR_MESSAGING_SENDER_ID'
}
};Use the following command to serve your angular application locally
ng serveUse the following command to build your angular application for production ready environment
ng buildDeploy to Firebase hosting service using the following command (Use this command after initializing all necessary firebase configurations in your repo)
firebase deploy