Will I be able to use Typescript with angular 2.0, or should I use Traceur?

As I asked in this post I was wanting to know how compatible Typescript is with ES6, which Typescript 2.0 plans to support:

Should I use Traceur instead of Typescript to target ES5 but be ready for ES6

However as I read this post by google it appears that Traceur is used pretty heavily in the upcoming Angular 2.0.

So I’m trying to decide on whether to go with typescript or Traceur to be better ready for Angular 2.0 (my team will have less refactoring).

Will Angular 2.0 understand Polymers shadow DOM?

In preparation for angular 2.0 I am using polymer. Does anyone know if the current polymer implementation is ready so that Angular 2.0 will be able to receive updates from polymer components/models. Currently only polymer can listen to angular model updates.

I would like my current UI to be ready for angular 2.0 ideally without having to modify the polymer code too much.

Angular: A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true

I know there are a lot of questions concerning CORS already but they don’t seem to answer my question.

So I have a client app written in Angular which will be used to create a mobile app (with Apache Cordova). The html files and JavaScript files will be loaded from the mobile device.
When I simulate that and I send requests to the REST API server I first got
“No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:82‘ is therefore not allowed access”.
So I added header(“Access-Control-Allow-Origin: *”); in my php REST API Server. I cannot specify a specific domain as the requests will come from the mobile devices.

Now I got to “A wildcard ‘*’ cannot be used in the ‘Access-Control-Allow-Origin’ header when the credentials flag is true.”

I finally found a solution but I’m not sure it is safe to keep it like this.

In my php REST API Server I added this:

if (isset($_SERVER['HTTP_ORIGIN'])) {
  header("Access-Control-Allow-Credentials: true");
  header("Access-Control-Allow-Origin: " . $_SERVER['HTTP_ORIGIN']);
  header("Access-Control-Allow-Headers: *, X-Requested-With, Content-Type");
  header("Access-Control-Allow-Methods: GET, POST, DELETE, PUT");
}

Please advise on this way of working. If it is not secure or no good at all, can you please tell me how to solve this issue?

Thanks a lot!

AngularJS 2.0 rewritten in ECMAScript?

So I just found out today that Angular 2.0 is coming out, they are using ECMAScript 6, but compiling it to 5, etc., etc., etc.

How will that (using ECMAScript) affect the usage? How will it be compatible with the JavaScript I use to call its API? I mean, having different languages (ES, JS) written together?

Confused at how this works. Help is appreciated.

EDIT

Sorry @Joseph if my question wasn’t clear enough, but I also (mainly) want to know how ECMAScript 5 runs in the browser and the second paragraph above keeping this in context.

How does a JavaScript person use Angular 2.0? How does ES work alongside JS code?

From the docs:

Though Angular will be in ES6, you can still write in ES5 if you don’t want to upgrade. The compiler generates readable JS and there are human-sensible analogs for the extensions.

I suspect that ES can be run by JS interpreters(?)

Alternative to $scope in Angular 2.0

In Angular 2.0, there will be no $scope.

What is the alternative to that? How will I be able share data between the components? Will the scope option be available in directives? More practically, is there a current alternative to that that I can get acquainted with?

I am aware of controller as but I read that controllers will be eliminated too.

Confused on such a revolution the Angular team has started.

Angular 2: Is usage of Parentheses / Square brackets mandatory?

In the Angular 2 previews released so far, the syntax of the markup has been modified from ng- prefixes to square parentheses and square brackets.

Whereas before one would have:

<input ng-model="userName" />
<button ng-click="btnClick()">Run</button>

The new syntax is:

<input [value]="userName" />
<button (click)="btnClick()">Run</button>

Does anybody know if this syntax is/will be mandatory, and without alternatives?

We currently have an application in which the HTML is generated through XSLT, and [ and ( are not valid attributes – thereby being unable to generate Angular 2 JS syntax.

The Status of SEO with languages as Angular and React?

I’m thinking of using Angular or React for a new web project but the SEO are an important part. From what I have read there are ways to solve it but it always results in keeping two page version alive or using an external service that renders the pages.

This sounds like bad options to me?

I have also read some unclear info about that search engines now can read javascript webpages with for example angular or react?

Could someone clarify this for me? Will SEO be as good with Angular as if I was using, for example, ASP.NET MVC?