These are chat archives for AngularClass/angular2-webpack-starter

9th
Mar 2017
Amir Malekpour
@amirma
Mar 09 2017 06:25
Hi -- has anyone successfully used material2 with angular2-webpack-starter?
@FMurray Looks like the maintainers decided to remove the branch since it was not well maintained. I saw an issue on that topic earlier today.
Amir Malekpour
@amirma
Mar 09 2017 07:11
okay, I managed to get material2 working, following this tutorial https://coursetro.com/posts/code/29/Working-with-Angular-2-Material
@FMurray , @bobrosoft ---^
Ritwik Banerjee
@ritwbanerjee
Mar 09 2017 20:54
hey guys, is there a way to lazy load a module after resolving data using angular resolvers?
multiple components inside a module might need the same data.. so might as well resolve it in the router when lazy loading the module instead of resolving in the components individually
is that possible at all?
Amir Malekpour
@amirma
Mar 09 2017 20:58
@ritwbanerjee I may be misunderstanding you, but seems like what you want is what resolvers are for.
The pattern is, you have a data service, and a resolver which together feed data into multiple comonents.
(if the components use the same data)
Ritwik Banerjee
@ritwbanerjee
Mar 09 2017 21:00
to simplify in my app.routing.module.ts i have loadChildren for 5 different modules.
each module has 10 components. As of now I have the resolvers at the component level. I want to move it app.routing .module.ts if possible. In a way resolve the MODULE when the data is available and then pass that on to the components
so essentially call the data service just once i.e. when the module loads. Right now, I have it at component level. This makes a service call 10 times
@amirma could i clarify?
Amir Malekpour
@amirma
Mar 09 2017 21:02
Yes, I see now.
Ritwik Banerjee
@ritwbanerjee
Mar 09 2017 21:03
Any possible solution?
Amir Malekpour
@amirma
Mar 09 2017 21:08
I have neve rtried that (i.e, having app-level resolver). I certainly have module level one, on the module routes.
Ritwik Banerjee
@ritwbanerjee
Mar 09 2017 21:08
yeah.. the problem of redundant API calls creeps in, in this case
something which I want to avoid
Amir Malekpour
@amirma
Mar 09 2017 21:08
Well, I think the API calls should definately not be done with each resolution
Meaning, there needs to be caching.
I have done that and it works pretty well for me.
Ritwik Banerjee
@ritwbanerjee
Mar 09 2017 21:09
not if the data can change frequently ;-)
eg: Cart
Stanislaus
@lanocturne
Mar 09 2017 21:21
Hi All. When i run e2e. The browser opens a blank page with "index of /" content rather than the /home page. It's a fresh clone on master.
Stanislaus
@lanocturne
Mar 09 2017 21:34
NVM. Need to run build:prod before e2e