view raw
Weiheng Li Weiheng Li - 7 months ago 37
AngularJS Question

Is it necessary to sign up a account when using Angularfire (firebase)?

I am new in this field and reading such code:

When I read some document about firebase here.

// Initialize the Firebase SDK
var config = {
apiKey: '<your-api-key>',
authDomain: '<your-auth-domain>',
databaseURL: '<your-database-url>',
storageBucket: '<your-storage-bucket>'

It seems we should signup one account and initialize the firebase as above, however, it seems in that case, I can't find such code. all I found is this snippet:

var ref = new Firebase(FBURL);
var services = {
saveNewUser: saveNewUser,
getUserAuth: getUserAuth,
createUser: createUser,
loginWithPwd: loginWithPwd,
setEventRef: setEventRef,
setOnAuth: setOnAuth,
logOutUser: logOutUser,
removeEvent: removeEvent
return services;


I just to ask why it doesn't look like my document?


The project at which you are looking is using older versions of Firebase and AngularFire:

<!-- Firebase -->
<script src="" defer></script>
<!-- AngularFire -->
<script src="" defer></script>

And the documentation to which you are referring is for the latest versions. The initialization has changed between versions. There is a migration guide that might assist you extrapolating the usage in the project to the current version AngularFire.

Regarding your question about creating an account, you will need to do that and you did need to do that with the previous version. It's just that the previous version was entirely URL-based. It didn't involve key-based intialization; you simply created a Firebase ref using your project-specific URL.

The documentation for the previous version of Firebase is available here. You will see that the first step mentioned in the guide involves creating an account.

And the documentation for the previous version of AngularFire is here.