Supercharge Your Creative Power
Join thousands of others that're staying up-to-date!

Recent posts

Clear Javascript Arrays in 3 ways

The first way to clear an array is to assign an empty array to the variable: The second way is by using Array.prototype.pop() which removes the last element from an array and returns that element. The third way to clear an array is by simply setting...

Here is why I love React Hooks

The latest ReactJS release contains a lot of new APIs but also some deprecations. Here is the video from the React Conf 2018 where you can learn more about the new changes. This library is more powerful than ever. One of the features I really like...

How to use Angular’s NgClass Directive

In previous posts I wrote about property binding with “className” and property binding with “class”. My preferred way of adding conditional or multiple classes is using NgClass. The syntax for NgClass looks like this: As you can see we can supply...

Property binding with “class” in Angular

Now that you know how to bind a property with className in Angular lets see how we can add a class name only if a condition is true. Angular provides a shorthand syntax which I absolutely love: If the condition is true, the headingStyle class will...

Property binding with “className” in Angular

In Vanilla Javascript if you want to add a class to an element you can do something like: Because in Angular we’re working with templates and bindings instead of DOM APIs, the code above can be done in Angular like this: When you run this...