title: How can I pass an array as Input() from the component template?
body: <p>I need to pass an array of values to a component using binding, e.g.</p>
  
  <pre><code>@Component({
      selector: 'my-component',
      template: '&lt;div data="[1, 2, 'test']"&gt;&lt;/div&gt;
  })
  export class MyComponent {
      @Input() data: any[];
      ...
  }
  </code></pre>
  
  <p>However, it seems Angular treats this as <code>string</code>/<code>string[1]</code> (in the actual project the array is a route and I need to pass this route on to a component which has the <code>[routerLink]</code> directive).</p>
  
  <p>How do I go about this?</p>