Inheritance for Angular Services

Veröffentlicht am: 24 August 2017
auf dem Kanal: David Donovan
413
0

Most Microsoft developers understand the significance of inheritance, when writing their server-side code, but don’t really understand how to make this object oriented principal useful in the client-side code. The principal is the same on the client-side, and it gives you the same benefits. The Angular.Net Starter App has an Angular service which all other services are derived from. This is a TypeScript file called “baseServices.ts”. This class contains the logic for making the restful calls to the server. It contains a “Get”, “Put”, “Post” and “Delete” method. It also contains the logic to log any errors, and maintains caching objects in the local storage for the “Analytics”.

You do understand why you want to be able to reuse this kind of logic throughout your application’s services? And have it only in one place? You do. Don’t you?


Auf dieser Seite können Sie das Online-Video Inheritance for Angular Services mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer David Donovan 24 August 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 413 Mal angesehen und es wurde von 0 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!