Angular 4 Tutorial - Services #13

preview_player
Показать описание

Services in angular 4 are used to share data among components. In services, utility functions or data can be defined that can be fetched from any component. Learn how to write, access and change data of services from components.

services in angular 4

Angular 4 Model Driven Forms:

Want to learn Angular JS 1?

Join facebook group:
Рекомендации по теме
Комментарии
Автор

0:00 The purpose of angular services

00:40 Create a service with ng g service in the angular cli

01:51 About the created files (...service.spec.ts and ...service.ts)

02:40 Adding the service to the app

03:31 Add a function and an object to the service

04:40 Import the service to a component

04:58 Inject the service instance as a parameter to the components constructor

05:49 Use the service (access the function and object added to the service before)

07:36 Share data between different components

-andymel
Автор

w already know and there are so many best. videos about services

kartikphilo
Автор

Sir can you share your github link for this project that you used in this example or any other angular 4 project for reference

rohansoudey
Автор

You can automatically load the server in browser by just adding -o to ng serve. So it would be "ng serve -o"

viralpatel
Автор

Hi, Can you explain any situation where I need to implements OnInit ?

jamesjaved
Автор

Hi, I am new to angular and node.

Can you create a video of how to connect a service to mssql db? or best way to manage database connections ?

pkum
Автор

Good man,
But I had problem with Dependency Injection

shokrysuleiman
Автор

hey when i move from one component to another by routing then its value(service properties) does not get changes(we getting same value).but it's value gets refreshed when a move from one component to another component by browser

pramodkumarw
visit shbcf.ru