1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Service injection causes nothing to render [closed]

Discussão em 'Angular' iniciado por Jeremy, Maio 19, 2025.

  1. Jeremy

    Jeremy Guest

    I'm working on a project for school, and I need to show I can use a service (which apparently I can't)

    anyways Everything will be rendering fine on my screen. and as soon as I try to inject my service, specifically this line (as well as the other way to inject a service) constructor (private apiService: ApiService){} the entire thing vanishes from my browser. I have no clue why and localhost/4200/map immediately reverts back to localhost without rendering anything. And the there doesn't seeem to be any errors showing.

    [​IMG] [​IMG] [​IMG] [​IMG] [​IMG]

    I've read over several things on the angular website but I can't tell what I'm doing wrong. Seems like it should be working to me.

    Continue reading...

Compartilhe esta Página