Thanks Sander. I actually ended up doing something very similar. So what I
have learned is that anything within the HTML Angular Element will
obviously have access to the Angular element’s class, properties, services,
etc. Anything outside the element in the loaded html page has no access to
 Angular.  One issue that I discovered today is that I have css classes in
the Angular HTML Element dependent upon property values set and updated in
the Angular Element’s class. The classes don’t seem to be changing upon the
property values changing in Angular. So, I assume that I have to change the
DOM element’s class from within the Angular Element’s class upon the
property value changing?

Thanks!

Scott

On Fri, Dec 28, 2018 at 10:16 PM Sander Elias <[email protected]> wrote:

> 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 a topic in the
> Google Groups "Angular and AngularJS discussion" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/PnHiXroP-VI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to