My final goal is to build a component to wrap Google Map. A google map object has lots of options.
In Angular1, I read attributes to build a map object options.
With Angular2, I want to do it differently to use properties binding using inputs, so that I can achieve one way or two-way binding.
As a first step, with this plunker, https://plnkr.co/edit/PXg79x?p=preview, I tried to read many properties from html and I have set inputs for multiple options. e.g., a, b, c, d, e, f
@Component({ selector: 'my-app', providers: [], inputs: ['a', 'b', 'c', 'd', 'e', 'f'], template: ` <div> <h2>Hello {{name}}</h2> inputs: {{inputs | json}} <br/> a:{{a}}, b:{{b}}, c:{{c}}, d:{{d}}, e:{{e}}, f:{{f}} </div> `, directives: [] }) export class App { constructor() { this.name = 'Angular2 (Release Candidate!)'; } } and I used in html like this.
<my-app [a]="1" [b]="2" [c]="3" [d]="4" [e]="5" [f]="6"> loading... </my-app> I was expecting that I see a:1, b:2, c:3, d:4.. and so on.
But instead, I see a:, b:, c:, d:, e:..
What am I doing wrong here?
---- EDIT ----
Also, I don't expect the answer, but if someone can tell me that I can define these inputs dynamically with or without defining inputs or @Input, it would be very appreciated.