why hello world text is not display?

Issue

I am new in Angular 2 .I saw this video
https://egghead.io/lessons/angular-2-say-hello-world-to-angular-2

Now I want to make same demo on plunker I tried like that

http://plnkr.co/edit/uQa9ZIvb38iTMaXsecaC?p=preview

Please tell where I am doing wrong

// Code goes here

import {bootstrap} from 'angular';
import {Component} from 'angular2/core';


@Component({
  selector:'app',
  template:'<div>hello</div>'

})

class App{}


bootstrap(App)

Solution

Here a working plunker

Things that you should keep in mind:

  • When you use System.import('file.ts'), you don’t need to <script src="file.ts">
  • Ensure you System.config with transpiler: 'typescript'

Hope this helps.

Answered By – Michele Ricciardi

Answer Checked By – Timothy Miller (AngularFixing Admin)

Leave a Reply

Your email address will not be published.