Q:

Pass data to an Angular 2.0 component

I know it's pre-release, but does anyone know if it's possible to pass an argument to an Angular 2.0 component
<div *foreach="#city in myObj.cities">
        <city-view current="city"></city-view>
</div>

class CityView{

...
}

I have the code above, but I am not sure how to pass a city into the city-view component. Does anyone know the proposed syntax? The above code will loop, but it does not allow me to pass data to the component.

A:

I have tried this in a newer alpha version of Angular 2.0 and the syntax is like this now:
<div *for="#city of myObj.cities" >
  <city-view [current]="city"></city-view>
</div>

Here is a full working example of an angular 2.0 template:
http://www.syntaxsuccess.com/viewarticle/recursive-treeview-in-angular-2.0

