angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

bug when using ng add

Open FathiGuemri opened this issue 1 year ago • 2 comments

Version info

Angular: 16.0.0

AngularFire: 16.0.0

ionic: 7.5.0

The problem is that all imports are on a single line without a comma, and the options must be in a file enviroment.ts

importProvidersFrom(provideFirebaseApp(() => initializeApp({ "projectId": "products-management-24d37", "appId": "1:297477400518:web:2e921bbcd4faaee5edf4c7", "storageBucket": "products-management-24d37.appspot.com", "apiKey": "AIzaSyBq8PkHk8YahCbve3DiOtXFDmhhabrzTy4", "authDomain": "products-management-24d37.firebaseapp.com", "messagingSenderId": "297477400518", "measurementId": "G-151GNJXTSH" })))importProvidersFrom(provideAuth(() => getAuth()))importProvidersFrom(provideFirestore(() => getFirestore()))importProvidersFrom(provideStorage(() => getStorage())),

FathiGuemri avatar Nov 07 '23 20:11 FathiGuemri

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Nov 07 '23 20:11 google-oss-bot

Check the ng command, it has a generator for the environment files.

This is one approach I took to getting the ng add command to work: https://medium.com/p/5383aeb2a2ce

jakehockey10 avatar Nov 08 '23 17:11 jakehockey10