Feedback for AngularJS 2 Beta tutorial and style guide.

*Part 4 of the tutorial* 
https://angular.io/docs/ts/latest/tutorial/toh-pt3.html it is suggested 
that a file be created named:

hero-detail.component.ts

This component is added to the file:

import { Component, Input } from '@angular/core';


@Component({
  selector: 'my-hero-detail',
})
export class HeroDetailComponent {
}


Then in the HTML file we add the element:

<my-hero-detail></my-hero-detail>


This seems inconsistent to me.  Why would we not match the file name, 
selector, and class name?

Why not let the selector match the file name as follows:

    selector: 'hero-detail',

and

<hero-detail></hero-detail>

It seems like fully consistent names would aid in tracking down the correct 
component.  I am brand new to Angular 2, and want to make sure I'm not 
missing something here.  

*The Quickstart guide* as well 
https://angular.io/docs/ts/latest/quickstart.html.

The component file is named: 
app.component.ts

The selector name / element is:
<my-app></my-app>

I expected it to be:
<app></app>


*The Style Guide* is a little more disconcerting 
https://angular.io/styleguide#!#components

The component file hero-button.component.ts defines an implementation for
<toh-hero-button></toh-hero-button>


What if down the road my app directory contains the following:
 

> app.component.ts
> app-one.component.ts
> my-app.component.ts
> test-zero.component.ts
> test-one.component.ts
> super-hero-button.component.ts
> hero-button.component.ts
> hero-button-promo.component.ts 


Let's say I open up index.html and find the element 
<guess-which-component></guess-which-component>. Which file in the app 
directory contains the component definition?  

It would be nice to see the tutorial and style guide demonstrate best 
practices and highlight pitfalls in this area.

All in all the documentation seems to be continually improving which is 
<awesome></awesome>.


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to