Hello. I'm new to Angular and I'm trying to build a pretty simple 
application that displays several articles that are each written in HTML. 
I'm interested in knowing about the best way to structure the application.

Here's what I've got so far:

   - AppComponent: The parent component which renders a template with a 
   <router-outlet> element within it.
   - ArticleListComponent: A component that lists all of the known articles 
   (there are only about 5 to 10, so the list is just manually maintained for 
   now).
   - SampleArticleComponent: A component that loads the text from a sample 
   article and displays it.

The AppComponent template looks something like this:

<md-toolbar>My Articles</md-toolbar>

<div class="app-content">
  <md-card>
    <md-card-title>This is where I'd like the article title to go
</md-card-title>
    <md-card-content>
      <router-outlet></router-outlet>
    </md-card-content>
  </md-card>
</div>

I've set the router to initially load the ArticleListComponent so that the 
user sees an index of available articles. What I'd like is for the user to 
be able to click one of the articles and have the title and content of the 
AppComponent template get updated. Right now I have it so that the 
router-outlet section is updated, but I'm struggling to figure out how to 
get the title to change as well.

Any thoughts on things I can explore? I'm open to the idea that I've 
structured my application poorly, and am willing to change if I can 
understand how to improve it.

Thanks.

Kamil

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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