So clearly there's something in the way I'm trying to display my code
that's not working, as I've tried displaying the data {{data.companyName}}
simply didn't work for me, I'll review that and find the err of my ways....
<section *ngIf="data" class="data">
<h2>Results</h2>
<p>{{ data.companyName }}</p>
<pre> {{ data | json }}</pre>
</section>
I can see I have some homework to do with pipes especially, as this would
have been handy to use in my debugging ( your line of code: ... {{ data |
json }}... ). For memorialization purposes the Angular docs even suggest
using JSON pipe for debugging purposes:
https://angular.io/guide/pipes
The JsonPipe <https://angular.io/api/common/JsonPipe> provides an easy way
to diagnosis a mysteriously failing data binding or inspect an object for
future binding.
I'm going to go ahead and consider this thread closed, even though I still
have to finalize exactly how I'll get my quote displayed and output into my
UI.
Thanks again for all of your help, you're making the learning process much
more effective.
Rich
On Wednesday, November 8, 2017 at 1:22:43 AM UTC-7, Zlatko Đurić wrote:
>
>
>
> On Wednesday, November 8, 2017 at 2:07:43 AM UTC+1, Rich Leach wrote:
>>
>> LOL
>>
>> ... you would think this would be something easy....
>>
>> {{data[0].companyName}} is not working, nothing gets returned (no errors
>> either).
>>
>> I've included the returned json below (copied directly from the console).
>> In my service call I'm actually calling "... response.json()" so I'm not
>> sure why this isn't rendering to the screen. I even tried
>>
>> <div *ngFor="let d of data">
>> QUOTE RETURNED: {{data[0].companyName}}
>> </div>
>>
>> ... no dice. Any ideas?
>>
>>>
>>>>
> Well, your code is probably buggy. Here, the "quote getter" works just
> fine:
>
> https://stackblitz.com/edit/quote-getter?file=app%2Fapp.component.html
>
> Take a look and see what you did differently.
>
>
--
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.