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
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?