0

Be a dear, and help me with this simple Angularjs 2.0 example using typescript.

What have I tried?

I will provide my index.html and plunker the rest (I am sure there are more than a few issues in the plunker link below), I am just starting AngularJS 2.0 + typescript.

<html>
  <head>
    <title>Angular 2 Todo</title>
    <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.9/angular2.min.js"></script>
    <script>
    System.config({
        transpiler: 'typescript',
        typescriptOptions: {emitDecoratorMetadata: true},
        packages: {app: {defaultExtension: 'ts'}}
    });
    System.import('app');
    </script>
  </head>
  <body>
    <app>Loading</app>
  </body>
</html>

Plunker Link

2
  • @GünterZöchbauer It doesn't run...visit my plunker... Commented May 20, 2016 at 16:48
  • 1
    Just use New > AngularJS > 2.0.x (TS) in Plunker to get a running Plunker with a recent Angular version (beta.9 is outdated). Commented May 20, 2016 at 16:50

1 Answer 1

2

You are using <script src="https://code.angularjs.org/2.0.0-beta.9/angular2.min.js"></script>

but importing your directives with rc syntax'@angular/common';

Here's a simple plunker with rc.1 for a start: Plunker

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.