Tito

My original code would have worked, as posted, with the following changes:

My .html file where I was looping through the output needed 2 changes:
• The replacement of the smart quotes with standard quotes
• My references to the service call values were all in lowercase 
(result.id, result.orderno, result.crew, result.jobnumber, result.yards, 
result.delivery); they needed to be upper-cased (result.ID, result.ORDERNO, 
result.CREW, result.JOBNUMBER, result.YARDS, result.DELIVERY). So with 
everything else remaining the same, this code pasted below is what made 
everything start to work again:

<div *ngIf="results">{{results}}
    <div *ngFor="let result of results" style="border: thin solid silver;">
      ID: {{result.ID}}<br>
      ORDER#: {{result.ORDERNO}}<br>
      CREW: {{result.CREW}}<br>
      JOB# {{result.JOBNUMBER}}<br>
      YARDS: {{result.YARDS}}<br>
      DELIVERY: {{result.DELIVERY}}
    </div>
  </div>

I think the factors that complicated matters for me personally were that I 
started coding on a Windows machine without editors (only Wordpad, hence 
the smart quote issue) and that I had never made this functionality work in 
Angular before, so I was seeing all of this brand new for the first time. 
So, for example when you suggested I add an Order class to my 
data.service.ts file I started to get confused as none of the docs I was 
using seemed to need that. But I tried all that you suggested and I'm sorry 
I didn't take a breath sooner to rewrite my code in a proper editor and 
give the correct attention to my HTML file casing. 

Like I said, my data.service.ts and app.component.ts files were OK 
(although I just ran another test with your Order class and type reference 
in the getAllOrders() call, and it also works fine with those code items 
remaining, so kudos!). It was the upper-case issue with the values in the 
.html file that would have messed up anyone else, I believe....

I'm near Denver. Ever come to Colorado? Beers on me my friend!

Rich 




On Tuesday, December 19, 2017 at 8:35:11 PM UTC-7, Tito wrote:
>
> ok Rich. Now explain to me why it worked.
> where abouts are you located?

-- 
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