Angular – enums and switch case in templates
Although TypeScript has support for enum
s, Angular’s templates can access only fields …. by the related component. I will present two ways of accessing enums in templates.
Although TypeScript has support for enum
s, Angular’s templates can access only fields …. by the related component. I will present two ways of accessing enums in templates.
I’m scared to think I keep using an email client which has so few configurations. I tried to find how to enforce the minimum font size in Gmail but I failed. Apparently there is no such option. Because emails written in font size 12px were too difficult to read on a small laptop screen, I wrote a script that sets the minimum font height.
…Running a niche web site and want to count every single visitor? I created a script that runs on the Google Analytics report page and alerts with a sound whenever the count of current visitors changes – so when a new person enters your site or leaves it.
…My blog includes a sidebar that is sometimes visible (on the home page or when browsing by a tag or category). However, after scrolling far, the scrollbar scrolls too and becomes invisible. I wanted the sidebar to be visible even after scrolling, but it had to be smart.
…In general, I strongly dislike debugging in Visual Studio Code, because it is a pain in the ass to configure for every project from the beginning, besides it sometimes simply doesn’t work.
One of the worst things to debug are unit tests running in Node.js. They run in weird threads, start with complicated frameworks, and often simply don’t hit breakpoints.
The worst so far was AVA.
…I decided to create a cross-platform desktop application that will run on Windows, MacOS, and Linux. I heard about a recent project Neutralino and tried using this framework. It has been a tough road…
…I often see Angular applications with bad architecture, especially no separation on modules. As a result, all components of an application are put in a single app/components
folder which makes it hard to separate concerns. Which components are grouped together? Which components require a service? Which component is merely a part of another component? Are there any dumb components?
In this article, I’ll show how easy it is to refactor an Angular application and extract a new module with existing components. I’ll describe a simple case, with no global services.
…Let’s assume you have an Angular application and you want to add the Angular Material library to it. What steps are necessary to take?
…I had a very short project (a dozen commits) which I wanted to convert to use conventional commits. Let me describe this non-conventional procedure I had to follow.
…It’s been a long time since I wanted to include a variation of conventional commits to one of my projects – mostly for automated changelogs, but also often to standardize naming commits. The available packages were confusing to me until I finally started to include them in a project.
…