mat-form-field must contain a MatFormFieldControl

Import MatInputModule in your module.ts file and it will solve the problem. The statement after it is the old answer. Unfortunately content projection into mat-form-field is not supported yet. Please track the following github issue to get the latest news about it. By now the only solution for you is either place your content directly into mat-form-field component or implement a MatFormFieldControl class … Read more

What is the difference between Promises and Observables?

Promise A Promise handles a single event when an async operation completes or fails. Note: There are Promise libraries out there that support cancellation, but ES6 Promise doesn’t so far. Observable An Observable is like a Stream (in many languages) and allows to pass zero or more events where the callback is called for each event. Often Observable is preferred over Promise because it provides the features of Promise and more. With Observable it doesn’t … Read more

ERR_INVALID_HTTP_RESPONSE using Angular 7 and ASP.Net Core 2.2 in Google Chrome browser

This may have to do with ASP NET Core 2.2 as you figured. There’s an issue registered on GitHub https://github.com/aspnet/AspNetCore/issues/4398 And the work-around is as follows – add the following bit of code in your startup.cs class (I’ve kept this first in Configure method) Do keep track of the GitHub issue.

What is .subscribe in Angular?

I’m going through angular-tour-of-heroes app, and I encountered .subscribe method in routing. Can someone explain what’s going on here? Link for the app: https://embed.plnkr.co/?show=preview Inside hero-detail.component.ts file,

Angular: Get current index in ngFor

As per OP’s comment on question : So, I am trying to get the index of the ngFor in order to do a comparison to array of data before triggering another function. For example, the test() function will be triggered when I click a button, then it will check the current index, and do something … Read more

What is pipe for in RxJS?

The “pipeable” (former “lettable”) operators is the current and recommended way of using operators since RxJS 5.5. I strongly recommend you to read the official documentation on pipeable operators The main difference is that it’s easier to make custom operators and that it’s better treeshakable while not altering some global Observable object that could possible make collisions if two different … Read more