I am doing the Tour of heroes tutorial. When I add the following piece of code to my heroes.component.ts file I get an error that says "Property 'selectedHero' has no initializer and is not definitely assigned in the constructor."
What should i do…
I know this may sound strange to all of you but for some reason I don't know how to explain myself why this would work, I am probably missing something crucial.
So basically in angular-tour-of-heroes app,
list of mock heroes is presented, you click…
I'm going through Angular's tutorial at https://angular.io/tutorial/toh-pt6 and I've got a couple of questions. My second question is very close to one asked here about the same Angular demo, but though it almost gets to my specific syntax question,…
I followed the steps exactly as described in the angular 'Tour of Heroes' tutorial. I didn't get too far since after adding the 'heroe-detail' feature component I get to following error:
fail: Microsoft.AspNetCore.SpaServices[0]
…
Just started writing test cases for Angular's Tour of Heroes, however when I run them I get a ERROR in src/app/hero.service.spec.ts:36:5 - error TS2532: Object is possibly 'undefined. I am very new to angular and I am struggling to find out what the…
I am doing the official "Tour of Heroes" Angular tutorial on angular.io.
After adding a module called 'heroes', and showing it, everything was fine. The heroes.component.html only contained one p-tag saying "heroes works!". When I change it, my…
I'm new to Angular and I started by doing the tutorial: "Tour of heroes".
I didn't understand the HTTP part and I hope that somebody could explained to me.
At some point they switched the mock-heroes with an InMemoryDataService and I understood…
I'm following the Angular 6 Tour of Heroes tutorial from https://angular.io/tutorial/toh-pt6 and all works well. The in-memory service works for the Dashboard, and the list of heroes displays fine.
But when a hero is clicked and the hero detail's…
I've been progressing well on the angular tutorial "tour of heroes" until my list of heroes failed to display while using angular's repetitive directive, *ngFor. Using npm -v6.4.1 and node -v8.12.0. The code is exact to what is in the tutorial.
I…
I am learning Angular. I am studying the angular.io/tutorial Tour of Heroes at https://stackblitz.com/angular/akkkxgnylgd. In app/hero.service.ts, there is this code:
@Injectable()
export class HeroService {
private heroesUrl = 'api/heroes'; //…
I am trying to build up the Tour of Heroes Application from The Angular Docs.
After Defining my Array of Heroes and trying to loop through it, it only brings up empty divs.
this is my code below:
html
I am enjoying the Tour of Heroes tutorial. Everything is working as it should but I'm really puzzled abou the http adding a hero functionality. It seems to magically know what id to assign to the new hero. I don't see any code anywhere that gets the…
I downloaded the final plunk for angular.io "tour of heroes" but I'm encountering errors. I'm using the package.json file from the first plunk because a package.json file isn't provided in the final plunk. npm start returns the errors below. This…
I've been stuck at the data binding part of this tutorial since yesterday
https://angular.io/docs/ts/latest/tutorial/toh-pt1.html
I've been getting this error
Unhandled Promise rejection: Template parse errors:
Can't bind to 'ngModel' since it…