Hi Scott,

However, responses is strictly being sent in as a string. It's not being 
> seen as an Array. Any thoughts on why?

 
Yes, I do!. As Elements are not angular, but DOM elements, they follow DOM 
standards. So you are setting an attribute now, and attributes are strings 
by default. There is no way to set a property from within HTML, you need JS 
to do that. 
However, you can use a getter/setter in your element to make it an array. 
something like this:

private choice: string[] = [];
@Input('choice') set _choice(s: string) {
this.choice = s.split(',');
}

If your HTML pages already exist and have array's in them, you might want 
to create a special function that parses your syntax into their expected 
types. Also, if you really sure there can be no tampering (I wouldn't be, 
ever!) you might use eval to handle it. 

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to