Pulling information from a previous webpage error (Angular2, Typescript, javascript, html) -


i'm making ebay clone website makes auction/bidding system wikipedia search results.

screenshot of search results: first screenshot

screenshot of different webpage (the "apple" in screenshot should instead "a"): second screenshot

i'm trying make variable consistent:

  • item.name

screenshot of error when trying {{item.name}} consistent: dropbox.com/s/wlcovvt8x5v7cne/screenthis.png?dl=0

code of biddingpage.component.html causes error:

 <label for="name">name of item: {{item.name}} </label>         <p>           </p> 

link full project: dropbox.com/s/84svnggv8xeub5m/fullprojectebayclone.zip?dl=0

name of code files changing:

  • wiki.component.ts

  • biddingpage.component.html

  • biddingpage.component.ts

link plunker of full project (currently not working): plnkr.co/edit/1lci4durhwa8d9iqtqsf?p=info

code of wiki.component.ts:

import { component }        'angular2/core'; import { jsonp_providers }  'angular2/http'; import { observable }       'rxjs'; import { wikipediaservice } './wikipedia.service'; import {router, routeparams, routerlink, router_directives} 'angular2/router';  @component({   selector: 'wikithing',   template: `     <h1>search , display page</h1>     <p><i>fetches after each keystroke</i></p>     <input #term (keyup)="search(term.value)"/>     <ul>      <li *ngfor="#item of items | async">{{item}} <br> <p>        </p> price (in usd): $ {{item.price}} <br> <p>        </p> availability: 24 hours <br> <p>         </p> quantity in stock: {{quantity}}         <br> <p>         </p> image of item: <img src="http://weknowyourdreamz.com/images/apple/apple-05.jpg" alt="apple" style="width:100px;height:100px;">        <br> <p>         </p>                <p>              </p>              <a [routerlink]="['biddingpage']">click here bid on item.</a>             <p>                  </p>         <br> <p>         </li>     </ul>   `,   providers:[jsonp_providers, wikipediaservice],   directives: [router_directives, routerlink],  }) export class wikicomponent {   constructor (private wikipediaservice: wikipediaservice) {}   items: observable<string[]>;       search (term: string) {     this.items = this.wikipediaservice.search(term);     this.items.map((items) => items.map(() => ({       name: items,       prices: math.random(),       quantity: math.random(),       availability: math.random()     })));      var prices = math.random() + math.random();     var quantity = math.random();   }  } 


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -