Sign in

Writing about Coding and Project Management
Angular Styling with NgStyle and NgClass

Creating dynamic styles in web applications can be a real challenge if you use vanilla JavaScript.
Luckily with have frameworks, and we have Angular that gives us multiple ways to handle dynamic CSS and CSS classes.

In this article you will learn how to easily manage the styling of your HTML elements by using ngStyle and ngClass, two built-in directive of the @angular/core.
With the intuitive syntax you can make complex logics and manage every type of situation that involve the manipulation of your app UI, let’s see the two directives in details.


The NgStyle directive lets you apply style…


localStorage is a key/value datastore that’s available on a user’s browser. Like cookies, localStorage can only store string data for its keys and values. The datastore is only accessible to JavaScript within that domain.

Cookies are still useful, especially for authentication, but there are times when using localStorage or sessionStorage may be a better alternative.

localStorage or sessionStorage are supported by all modern browsers and you can use them today without any problems.

What is the Web Storage API?

The Web Storage API is a set of mechanisms that enable browsers to store key/value pairs. It is designed to be much more intuitive than using cookies.

The official Angular doc contains some best practices for effective development but there are other tips that will help you make your application more maintainable and optimized.

Here is a list of my tips and tricks that I use in Angular every day that will help you develop better applications.

Use Services to Handle Side Effects

When building your application, it’s always useful to reduce side effects like HTTP requests, time-based events, etc.

Abstracting these types of operations from the component to services will reduce the complexity of your components and also ensures the reusability of the services.

A classical example is fetching data from an…


With the Next-Gen around the corner, many of us have wondered what Nintendo’s strategy would be to keep up with rival hardware.

Nintendo Switch it’s in an uncomfortable position due to its hybrid nature that can become a big bottleneck for accessing the cross-platform titles market.

After months of speculation about a possible hardware revision, with incessant rumors about the arrival of a new Switch Pro, Nintendo surprised everyone by exploring a sector which has been unknown by the Kyoto company since now: the Cloud Gaming.

A new life for Nintendo Switch?

The last partners' Showcase of the year, a Direct Mini exclusively dedicated to the…

Horror is one of my favorite video game genres because unlike movies and tv shows in the same category, the player is in control of what’s happening instead of being a passive observer.

Most horror games have you stick with a set story while being chased by monsters in homicidal maniacs, but the developers at Supermassive Games want you to create a story with the Dark Pictures Anthology.

After they released Until Dawn in 2015, they began working on these smaller “choose your own adventure” stories that are meant to be replayed over and over to witness all possible outcomes.

The Japanese console giant has finally revealed the PlayStation 5 user interface. What we saw wasn’t just a pretty new UI, either. Sony is demonstrating a clear intention to build a machine that is faster and leaner than its predecessors — not just in terms of the launch titles, but in terms of numerous features that impact the day-to-day use of the console. Here’s an overview of the key elements of the PlayStation 5 operating system.

Have you ever heard about hybrid applications?

Hybrid application development is a topic highly discussed nowadays and we are seeing a dizzying growth of this way of making applications.

Surely, you’ve heard about hybrid applications in the mobile environment with frameworks such as Cordova and Ionic, but today I want to introduce you to a framework that lets you make the exact same thing but with desktop operating systems and creating cross-platform desktop applications: Electron.

Electron is an open-source library developed by GitHub for building cross-platform desktop applications with HTML, CSS, and JavaScript, next we’ll see how to create your…

The recent reveal of the PlayStation 5’s design has divided the gaming world. There are those who appreciate its bold, daring industrial design and those who would have preferred something a little less outlandish; perhaps a little more traditional.

Over the years, console design has differed greatly. Various shapes, colors, and sizes have been utilized. Some machines have been far more conservative and utilitarian in nature, while others have been bold design statements. …

MVP, Minimum Viable Product, is a term derived from the startup industry which expresses the state of a software between the prototype and a good-enough product for public consumption.

The MVP is the first version of your product that your audience will be exposed and the challenge is to give them enough features to resolve their problems without taking care of side functionalities that are not essentials for users to determine if your product is useful or not.

The MVP is the first real contact with your customers and it’s an opportunity for your business to connect with early adopters…

Cloud gaming has been around for years. And it’s always faced serious questions around viability. It’s easy to forget that the OnLive service kickstarted cloud gaming way back in 2009. It promised to enable gamers to play their favorite titles from any device, entirely disconnecting players from the need to own expensive dedicated gaming machines.

Hindsight is 20/20. We know that OnLive ultimately didn’t succeed, and that cloud-based gaming has evolved significantly in the subsequent 10 years.

There are now numerous cloud gaming services on the market, although the ultimate vision of cloud gaming still hasn’t been achieved — at…

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