Angular directive basics [2] - Adding styles

Directive with styles There are time when you want to build a directive but you also require to add some minor CSS styles for it, unfortunately this is not possible with the current implementation of @Directive in Angular. But there is a chance to do just that by adding into play the @Component…

Read More

Angular directive basics

Angular Directives basics Angular directives allow you to attach new behavior to DOM elements by using metadata properties: Metadata Properties: exportAs - actual name that is used by other components inside their templates. host - js object of class property to host element properties inputs - list…

Read More

Fixed bar with animated social icons

Fixed bar with animated social icons Have you ever wondered how some of the websites that you visit have a fixed bar with social icons on the left of the page and it just sits there? Have no fear because this post will cover that! How to make an element fixed: .div{ position: fixed; } Done! Yes, is…

Read More

Sum of two numbers using preprocessor directives

Build a simple preprocessor directive for getting the sum of two numbers Sum of two numbers using a simple macro: Why use a macro instead of a function? The first and main reason is portability in different architectures or compilers because all the preprocessor directives are processed before the…

Read More

CSS Animations

CSS Animations When building a css animation you’ll need to know to essential keywords: @keyframes animation The first one is used to define how an animation behaves over time and the second one is used to reference the keyframes that we create. Let’s assume that we have a box and we need to shift…

Read More
Page 10 Of 12