baseballr
baseballr

Reputation: 63

Angular TS Constructor making Web Page Disappear

constructor(
      private formBuilder: FormBuilder,
      //private accountService: AccountService,
      ) { }

When I Un-Comment that line it makes the webpage no longer accessible. Although Angular has no complaints in the terminal. It compiles and runs fine. It redirects me back to the home page because I have it set so that all invalid URLS redirect back to the home page. Does anyone know what is causing this? I've commented out the code that uses that constructor but even so just that line makes it unreachable.

Upvotes: 0

Views: 194

Answers (1)

baseballr
baseballr

Reputation: 63

In case anyone stumbles across this I was missing this from my app.module.ts

    providers:
    [
        AccountService, 
        HttpClient,
        HttpClientModule
    ]

Upvotes: 1

Related Questions