Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

Posts tagged with Service

May 5, 2017

Build a Simple Angular Service to Share Data

Filed under: Angular @ 2:20 pm
Tags: ,

The content of this post is based on Angular version >= 2.x unless explicitly stated otherwise. I’ve seen some complex code on Stackoverflow and elsewhere recently where the developer was using Subject and Behavior Subject as part of an Observable solution to simply share data between unrelated components with Angular. In some cases, the Observable […]

August 12, 2015

Angular Custom Services in TypeScript: Factory vs Service

Filed under: AngularJS,TypeScript @ 1:14 pm
Tags: , , ,

In my prior post (http://bit.ly/DeborahK_AngularServices) I outlined the difference between the factory pattern and service pattern when building a custom Angular service with JavaScript. In this post we’ll look at the differences when the Angular custom service is written in TypeScript. Angular Custom Service The basic code to create an Angular custom service in TypeScript […]

August 7, 2015

Angular Custom Services: Factory vs Service

Filed under: AngularJS @ 1:11 pm
Tags: , ,

When we want reusable code in our Angular application we build a custom Angular service. We can then use that service in any Angular code that needs it. There are several types of services available in Angular, but there are two types that are used most often: Factory and Service Factory We can create a […]

© 2019 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs