angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Getting started guide step 4 Inject Firebase, confusing term

Open lebsral opened this issue 10 years ago • 8 comments

on step 4 it says "Open /src/app/.component.ts..." that file doesn't exist after running ng new

Perhaps instead of "Open" it should say "create?"

my setup: $ ng -v Could not start watchman; falling back to NodeWatcher for file system events. Visit http://ember-cli.com/user-guide/#watchman for more info. angular-cli: 1.0.0-beta.11-webpack.8 node: 6.5.0 os: darwin x64

lebsral avatar Aug 31 '16 15:08 lebsral

Here is where I am looking...

noappcomponetts

lebsral avatar Aug 31 '16 15:08 lebsral

The <> means it's variable. The Angular CLI used to print out your app's name in the file path. Now it's just app for the root component. We'll remove this in the upcoming release, but the actual project structure is still the same.

davideast avatar Sep 01 '16 13:09 davideast

Hmm, I'm still confused then, just in a new way. I was thinking that the variable would have been replaced. In my example above it would have been ang2fb.componet.ts. Since 'ang2fb' was what I called my project. No matter what I start the project out being called, it always names that file app.componet.ts . It doesn't vary, which is counter to the meaning of the word 'variable.'

BTW, I'm not trying to convince you that I'm right. I'm trying to explain the nature of my confusion.

lebsral avatar Sep 01 '16 13:09 lebsral

To add to my confusion. Look at the step labeled - 4. Inject AngularFire:

If we go with, '' is a variable that in this instance means 'app'. Then as was discussed above, .componet.ts becomes app.component.ts. Fine.

But then, selector: '-app', becomes 'app-app'. Are we really calling the selector 'app dash app?'

import { Component } from '@angular/core'; import { AngularFire, FirebaseListObservable } from 'angularfire2';

@Component({ moduleId: module.id, selector: 'app-app', templateUrl: 'app.component.html', styleUrls: ['app.component.css'] }) export class appComponent { constructor(af: AngularFire) {

} }

lebsral avatar Sep 01 '16 14:09 lebsral

@davideast Also confused here

rememberlenny avatar Sep 09 '16 07:09 rememberlenny

@lebsral @rememberlenny

I think I have discovered the source of the confusion. This is new to the webpack branch of the CLI.

If you use that branch it generates the app folder.

npm install angular-cli@webpack -g

davideast avatar Sep 13 '16 23:09 davideast

@davideast That might have fixed it. I got further and got different errors. Which I think are related to the CLI and not firebase itself so I posted it here https://github.com/angular/angular-cli/issues/2147 from my perspective you can close this issue.

lebsral avatar Sep 15 '16 20:09 lebsral

@davideast Whatever discussed above has been taken care and the documentation has been updated. I guess this issue can be closed now.

mukesh51 avatar Sep 21 '16 07:09 mukesh51