Base solution for your next web application
Open Closed

Error: No provider for LoginService #4017


User avatar
0
rafalpiotrowski created

Hi, I donwloaded latest version of 'dev' from git building solution works running IISExpress works npm start works without errors

but when I run <a class="postlink" href="http://localhost:4200">http://localhost:4200</a>

I receive the following error ERROR Error: Uncaught (in promise): Error: No provider for LoginService! Error: No provider for LoginService! at ReflectiveInjector_.prototype._throwOrNull (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:140837:13">http://localhost:4200/vendor.bundle.js:140837:13</a>) ... at createViewNodes (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:150393:17">http://localhost:4200/vendor.bundle.js:150393:17</a>)

Any idea what is wrong?


5 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    looks like you didn't addLoginService to the module.

    Checkout Service proxy generation title <a class="postlink" href="https://aspnetzero.com/Documents/Developing-Step-By-Step-Angular#service-proxy-generation">https://aspnetzero.com/Documents/Develo ... generation</a>

  • User Avatar
    0
    rafalpiotrowski created

    In which module???

    Where can I find more details on the error?

    I merged my working version with latest dev repo and there was no merging conflicts

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @rafalpiotrowski,

    It should be added in acocunt module <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/account/account.module.ts#L30">https://github.com/aspnetzero/aspnet-ze ... ule.ts#L30</a>

  • User Avatar
    0
    rafalpiotrowski created

    got it fixed

    indeed missing import of LoginService

  • User Avatar
    0
    ismcagdas created
    Support Team

    Great :)