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.
component (this works)
<mycomp [arrayValue]= "someArrayVar">html</mycomp>
but I'm not sure what I need to do to make this work??
component (not working)
<mycomp arrayValue= "[1,2,3,4,5]">html</mycomp>
my directive looks something like this...
directive
export class MyComp implements DoCheck, OnInit {
@Input() arrayValue: number[];
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 "[1,2,3,4,5]"