The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Share a Service Across Angular 2 Components and Modules

Share a Service Across Angular 2 Components and Modules

2:51
Services are used to share data between components. They follow a module pattern that allows you to use the data throughout your application so that your data is consistent and in sync.
Watch this lesson now
Avatar
egghead.io

Services are used to share data between components. They follow a module pattern that allows you to use the data throughout your application so that your data is consistent and in sync.

Avatar
bmw-rules

Why did you expose the module with the providers by the static forRoot method, instead of just declaring the providers in the @NgModule({})?

In reply to egghead.io
Avatar
Andrey

I also would like to know why. I notice this question is from awhile ago, do they ever get around to explaining it?

In reply to bmw-rules
Avatar
Harry

lack of explanation. talk about concepts that hasn't been covered yet.
i dont know if this lecture worth money.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?