Issue
I am trying to display component text in angular 2 .but it is not display .could you please tell me where I am doing wrong ?
here is my code
http://plnkr.co/edit/PrWxwf3wT5COVxRwIpqX?p=preview
<!DOCTYPE html>
<html>
<head>
<script src="https://code.angularjs.org/2.0.0-beta.0/angular2-polyfills.js"></script>
<script src="https://code.angularjs.org/tools/system.js"></script>
<script src="https://code.angularjs.org/tools/typescript.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.0/Rx.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.0/angular2.dev.js"></script>
<script>
System.config({
transpiler: 'typescript',
typescriptOptions: { emitDecoratorMetadata: true },
packages: {'gg': {defaultExtension: 'tp'}}
});
System.import('boot')
.then(null, console.error.bind(console));
</script>
</head>
<body>
<my-app>Loading...</my-app>
</body>
</html>
Solution
Since you don’t have a folder (package), you can specify your extensions explicitly.
System.import('boot.tp')
.then(null, console.error.bind(console));
And
import { AppComponent } from './script.tp'
Answered By – pixelbits
Answer Checked By – Candace Johnson (AngularFixing Volunteer)