Difference between Component & Directive in Angular

Difference between Component & Directive in Angular: Component: Components can be created using @Component annotation. <app-header></app-header>, here app-header is the component. Components helps to split the application into smaller components. Only one component can be used per DOM element. <app-header app-footer></app-header app-footer> can’t do like this and all. Directive: Directive can be created using @Directive annotation. <button highLightMe>I log when […]

602 total views, no views today

» Read more

Difference between Structural and Attribute directives in angular?

What is the difference between Structural and Attribute directives ? Directives are divided into two types namely Structural and Attribute directives. These are the differences: Structural directives: It changes the structure of the DOM. * is prefixed to the structural directives. *ngIf, *ngFor are the examples of structural directives.   Attribute directives: It just changes the appearance of the DOM. […]

640 total views, 2 views today

» Read more

All about pipe in angular 5 for dummies (custom pipe | pure | impure pipes)

All about pipe in angular 5 for dummies (custom pipe | pure | impure pipes) We can create our custom pipes with the below steps: Create the typescript class with @Pipe decorator 2. Provide the name of the pipe to the @Pipe decorator’s name property. 3. Implement the class with PipeTransform 4. Provide the implementation of the pipe functionality inside […]

357 total views, no views today

» Read more

Generate angular + Java code using yeoman & Jhipster

Generate angular + Java code using yeoman & Jhipster Ensure you have installed yeoman (yo when dealing with npm and yarn) and jhipster (generator-jhipster when dealing with npm and yarn). If not installed, have a quick look at,     Step 1: Run yo jhipster     It will ask around 10 to 15 questions, you can provide the sample […]

482 total views, no views today

» Read more

100 Things to Know in Angular 4/5

100 Things to Know in Angular 4 I started writing this post with the intention to keep important and crispy factor about angular in one place. But I am not able to write all the 100 things about angular same time, so I am publishing the post with the information I have handy now and I will make sure this […]

396 total views, no views today

» Read more

Angular 5 Lifecycle Hooks for 2Mins Read

Angular 5 Lifecycle Hooks for 2Mins Read: What are lifecycle hooks ? Lifecycle hooks are the different phases during component initializing and projection to view, when a new component is encountered in the selector, then angular takes care of initializing the component to project it in the view with different phases. These are called lifecycle hooks in angular. All these […]

391 total views, no views today

» Read more

Understanding angular 4/5 flow

Understanding angular 4/5 flow: In highlevel this is the flow, Main.ts > AppModule > App.component, it serves the content available in the Template file. I request you to run first angular cli project from this link, How to install Angular-CLI in Windows 7 ? Running First Angular-CLI Project in 2 Minutes then read below to understand how angular / angular […]

621 total views, no views today

» Read more

Typescript Quick Notes for Angular Developers

Typescript Quick Notes for Angular Developers: As because of angular’s reach angular developers are forced to learn typescript. It is not tough but it is better to know the below basic syntax to code faster.   1. Converting array to JSON in typescript   selectedItems = []; JSON.stringify(this.selectedItems);       2. For loop in typescript   for(let item of […]

691 total views, no views today

» Read more