With working code and examples!

Turns out, retry operator, like many others subscribes to the observable that it is applied on.
What’s different is that retry works on the error case. On the error case it re-subscribes to the source observable as many times as attempts it was given.

So retry(2) will listen for error and retry once, then listen for another error and retry a second time and then on the third error it will give up and let the error bubble up to your error handler.

For more details, code, and step by step head over https://www.educative.io/edpresso/what-is-the-rxjs-retry-operator-and-how-does-it-work

Mother and daughter separated by a narrow creek
Photo by Simon Rae on Unsplash

Separating the 💸business and ✨UI logic problem in Angular.

This article aims to give you a tool to help keep those 💸business and ✨UI concerns separate. It’s the result of a year’s worth of experimentation in a couple of teams I worked with. It might seem unnatural and complex at first, but then again isn’t everything new like that?

We will introduce a pattern that is extreme in its approach on the one hand and very straightforward to apply on the other.

Optimize for the case that the software we write will change and evolve!

There are 2 problems:

  1. We want to separate 💸business logic from ✨user interface logic…

Photo by Justin Kauffman on Unsplash

Why I don’t use Angular TestBed and perhaps you shouldn’t either

In this article, I will do a brief overview of TestBed, talk about some of its properties and practices, and then offer an alternative. An alternative that gives you back control over your tests! And a test-automation option!

Let’s make the state of the component our interface with Angular and let it render HTML and do DOM.

I need to only test MY code.

During my practice, I’ve found using TestBed to be sub-optimal and have developed a strategy that works really well for unit testing components, services, and…

Also helpful when debugging VS Code extensions…

Want to check on a plugin memory consumption? Follow these steps:

Shift + Ctrl + Esc will bring up your Task Manager.

Add missing column “Command Line” by right clicking on any column title and then on “Select columns”:

Photo by Yusril Permana ali on Unsplash

A step by step tutorial.

At the end of this tutorial, you’ll have a release pipeline that’s triggered by a merge to release/1.0.1 branch and only waits for your approval before publishing to NPM.

Let’s assume you’ve got some source code hosted on GitHub and you’d like to publish that as an NPM package using Azure DevOps.
Both GitHub and Azure DevOps accounts are free to sign up for and use on open source projects!

Here’s high level what this article covers:

  • create a Build pipeline triggered by a merge to a release/* branch
  • create a Publish pipeline triggered on…

Photo of logs by Monika Grabkowska on Unsplash
Photo of logs by Monika Grabkowska on Unsplash.

Getting some logs can’t be that hard, can it? I can surely do that in a few lines of code!

Orignally published indepth.dev

Well, that’s what I thought… initially. It turns out it’s more than just calling a GET endpoint.

Some of it is that the response from the logs endpoint is actually a zip file. And inside that there are multiple file entries — one for each pipeline task. Plus there’s the authorization part. So…

This article will take you step by step from a blank file to having the logs from your Azure Dev Ops Release pipeline. As…

Thanks Angular.io and https://icons8.com/icons/set/form for images

Strong typing Forms libraries and articles overview.

Seems there’s a lot to be said about strongly typing @angular/forms

This is part of the Angular Forms Story series:

  • Angular Forms Story: A Dev Tool (link)
  • Angular Forms Story: Strong Types (link)
  • Angular Forms Story: The Whole Story (this one)

While looking into making my forms type-safe I found that a lot of people have already done a lot of work both as part of the Angular framework and external to the it. I’ll try to list and shortly summarize my findings here.

Here’s what we’ll see:

  • efforts internal to Angular to…

Here’s what works, I found out the hard way.

These tips are the result of me publishing a few Angular libraries and making some silly mistakes. Hope you find some of them useful:

  • Use the CLI and library schematic (ng g library) to scaffold your library. It does a lot of work you’ll otherwise need to do manually: Updates angular.json and adds an ng-package.json config file which allows package config. Ng packager emits a standard Angular library with a public-api.ts which is what is expected by the ng compiler.

How I strongly typed my Angular forms. And you can too!

Originally published in Angular-In-Depth here.

This is part of the Angular Forms Story series:

  • Angular Forms Story: Dev Tooling (link)
  • Angular Forms Story: Strong Types (this one)
  • Angular Forms Story: The Whole Story (coming up)

Angular Reactive Forms are not strongly typed! AbstractControl and it’s implementations FormControl FormGroup and FormArray do not support strong typing their value or changes or any other property/method. For the longest time, I accepted and worked around that, considering it just one of life’s things — so it goes…

In this article, I want…

Thanks Angular.io and https://icons8.com/icons/set/form for images

A simple tool to make Dev’s life easy :)

This is part of the Angular Forms Story series:

  • Angular Forms Story: A Dev Tool (this one)
  • Angular Forms Story: Strong Types (link)
  • Angular Forms Story: Alternatives (link)

More than once, while developing forms in Angular application I had to template hack {{form.value | json}} and {{form.valid}} and form.pending while editing to check if my form control was actually doing what I wanted it to do.
I thought:

Wouldn’t it be nice if there was a component to show me all the info about the form?

So I created it:

Georgi Parlakov

Angular and DotNet dev. RxJs explorer. Testing proponent. A dad. https://gparlakov.github.io/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store