title: Angular 2 pass array into directive via attribute not variable
body: <p>Working my own custom component and stuck with how to make it use both attributes and variables. I'm using @Input attribute directives and this works when I pass in correctly scoped variables.</p>
  
  <p><strong>component (this works)</strong></p>
  
  <p><code>&lt;mycomp [arrayValue]= "someArrayVar"&gt;html&lt;/mycomp&gt;</code></p>
  
  <p>but I'm not sure what I need to do to make this work??</p>
  
  <p><strong>component (not working)</strong></p>
  
  <p><code>&lt;mycomp arrayValue= "[1,2,3,4,5]"&gt;html&lt;/mycomp&gt;</code></p>
  
  <p>my directive looks something like this...</p>
  
  <p><strong>directive</strong></p>
  
  <pre><code>    export class MyComp implements DoCheck, OnInit {
  
        @Input() arrayValue: number[];
  </code></pre>
  
  <p>Would appreciate anyone who can explain how I'd implement both input alias and attributes for passing in when no variable is used and a string is passed like <code>"[1,2,3,4,5]"</code></p>