Thursday, 15 May 2014

Simple Angular 2 project fails 'Unexpected reserved word' -


I am trying to create a simple angle 2 project based on the ng2do project. I am using Quick Start and I have the following code ...

  & lt; Script src = "js / quickstart / dist / es6-shim.js" & gt; & Lt; / Script & gt; Import from {component, template, bootstrap, foreach} 'js / quickstart / angular2 / angular2';  

This gives me the following error ...

  Unwanted syntax error: unexpected reserved word  

What do I do Am missing?

I do not know if it helps me understand the issues throughout the day because it was Because I was starting my code with a script reference

  & lt; Script src = "app.js" & gt; & Lt; / Script & gt; Instead of using  

  & lt; Script & gt; System.import ('Applications'); & Lt; / Script & gt;  

Hope this will help you use it in tsconfig

  {"version": "1.5.0-beta", "compiler options" : True, "noLib": false, "preserveConstEnums": True, "suppressImplicitAnyIndexErrors": "" "false", "remove" "false"; "True", "EmitDecoratorMetadata": true, "experimentalDecorators": true}, "filesGlob": ["./**/*.ts", "!./Node_modules / ** / * .s"], " Files ": [". / .main.ts "," ./show-properties.ts "," ./typings/angular2/angular2.d.ts "," ./typings/es6-promise/es6-promise.d .ts "," ./typings/rx/rx-lite.d.ts "," ./typings/rx/rx.d.ts "]}  

No comments:

Post a Comment