Permalink
Browse files

Updates

  • Loading branch information...
1 parent 018d4d1 commit bec55e561ebdde829778ae81c381ce3d39817f65 @mlynch mlynch committed Nov 20, 2016
Showing with 15 additions and 7 deletions.
  1. +1 −1 _config.yml
  2. +12 −0 modules/index.md
  3. +2 −6 viewChild/index.md
View
@@ -2,4 +2,4 @@ markdown: kramdown
kramdown:
input: GFM
highlighter: rouge
-angular2_version: 2.0.0-rc.1
+angular2_version: 2.1.1
View
@@ -0,0 +1,12 @@
+---
+layout: default
+title: Modules and NgModule
+edit_link: https://github.com/driftyco/learn-angular2/edit/gh-pages/modules/index.md
+tweet: "How modules and NgModule work in Angular 2"
+---
+
+Angular supports external modules that can be built and shared with other Angular projects.
+
+#### ES2015 Modules
+
+#### NgModule
View
@@ -5,9 +5,6 @@ edit_link: https://github.com/driftyco/learn-angular2/edit/gh-pages/viewChild/in
tweet: "Access child components in Angular 2"
---
-
-_Updated November 20, 2016_
-
Child components in our view can be accessed from our parent component easily with `@ViewChild`.
#### `@ViewChild`
@@ -49,7 +46,7 @@ export class MasterPage {
constructor() { }
- ngAfterViewInit() {
+ ngAfterViewInit() {
// After the view is initialized, this.userProfile will be available
this.update();
}
@@ -71,8 +68,7 @@ import { Component, ViewChild } from '@angular/core';
import { UserProfile } from '../user-profile';
@Component({
- template: '<user-profile #myProfile (click)="update()"></user-profile>',
- directives: [UserProfile]
+ template: '<user-profile #myProfile (click)="update()"></user-profile>'
})
export class MasterPage {
@ViewChild('myProfile') userProfile: UserProfile

0 comments on commit bec55e5

Please sign in to comment.