The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

sikra (2) [Avatar] Offline
#1
Hi, I have played around with the example project (chapter 2) and since the latest update everything works fine. However if I try to use 'templateUrl' in the components instead of 'template' the HTML is not displayed at runtime. No error message neither. Any idea why that could be?
jeremy.wilken (208) [Avatar] Offline
#2
Would you mind posting the component code you are using?

Jeremy
sikra (2) [Avatar] Offline
#3
Sorry, when starting to send you my code I have already seen my error:

@Component({
  selector: 'app',
  directives: [RouterOutlet, RouterLink],
  templateUrl: './app.html'
})


Then I realized it should be like this:
@Component({
  selector: 'app',
  directives: [RouterOutlet, RouterLink],
  templateUrl: 'client/components/app.html'
})


And suprisingly doing it right works! Anyways thankyou for your fast answer!
jeremy.wilken (208) [Avatar] Offline
#4
Always happy to help!

Jeremy