ivy-universal icon indicating copy to clipboard operation
ivy-universal copied to clipboard

How do I inject HttpClient in this project?

Open mohammedzamakhan opened this issue 5 years ago • 2 comments

mohammedzamakhan avatar Mar 27 '19 14:03 mohammedzamakhan

You do not :) One of the newer ideas is to make your data dependencies declarative so that the system can fetch the data before the component is bootstrapped. This let's the component rehydrate properly where the server left off.

Search for @InitialData on how we ate thinking about this.

vikerman avatar May 29 '19 13:05 vikerman

@vikerman that makes sense for the initial data, but any other API call to update or delete, still will require us to use fetch later. HttpClient is a great Angular Module with interceptors and other capabilities. I would love to see how you would be using it in this repo

mohammedzamakhan avatar May 30 '19 05:05 mohammedzamakhan