Permalink
Browse files

Hello RC.5

  • Loading branch information...
bokuweb committed Aug 14, 2016
1 parent 36bbe2d commit 5aa2b450ebf03952ede08dd495a1dbadcee56f52
Showing with 33 additions and 8 deletions.
  1. +27 −2 app/main.ts
  2. +0 −3 components/comment-box.ts
  3. +0 −2 components/comment-list.ts
  4. +6 −1 db.json
View
@@ -1,5 +1,30 @@
import { bootstrap } from '@angular/platform-browser-dynamic';
import { NgModule, ApplicationRef } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { CommentList } from '../components/comment-list';
import { CommentForm } from '../components/comment-form';
import { CommentItem } from '../components/comment-item';
import { HTTP_PROVIDERS } from '@angular/http';
import { CommentBox } from '../components/comment-box';
bootstrap(CommentBox, [HTTP_PROVIDERS]);
// bootstrap(CommentBox, [HTTP_PROVIDERS]);
@NgModule({
declarations: [
CommentBox,
CommentList,
CommentForm,
CommentItem,
],
providers: [
HTTP_PROVIDERS,
],
imports: [BrowserModule],
bootstrap: [CommentBox]
})
class AppModule {
}
platformBrowserDynamic().bootstrapModule(AppModule);
@@ -1,13 +1,10 @@
import { Component, OnInit } from '@angular/core';
import { CommentList } from './comment-list';
import { CommentForm } from './comment-form';
import { CommentService } from '../service/comment';
import Comment from '../interfaces/comment';
@Component({
selector: 'comment-box',
providers: [CommentService],
directives: [CommentList, CommentForm],
template: `
<div class="commentBox">
<h1>Comments</h1>
@@ -1,9 +1,7 @@
import { Component, Input } from '@angular/core';
import { CommentItem } from './comment-item';
@Component({
selector: 'comment-list',
directives: [CommentItem],
template: `
<div class="comment-list">
<div *ngFor="let comment of comments">
View
@@ -4,6 +4,11 @@
"id": 0,
"author": "foo",
"text": "bar"
},
{
"author": "asd",
"text": "asd",
"id": 1
}
]
}
}

0 comments on commit 5aa2b45

Please sign in to comment.