Category: Angular
-
Communication Between Components Using @Input() in Angular
In Angular 2 a component can share data and information with another component by passing data or events. A component can be used inside another component, thus creating a component hierarchy. The component being used inside another component is known as the child component and the enclosing component is known as the parent component. Components […]
-
Simplifying Two-Way Data Binding in Angular
There are three types of data bindings in Angular , they are as follows: Interpolation Event Binding Property Binding If you are coming from Angular 1.X background, you might be wondering that where is the two-way data binding? Remember, when first time you saw AngularJS 1.X demo, and was just blown away by power of […]
-
Introduction to Angular Components
A component is a main building block of an Angular application, and an application may have any number of components. We can consider a component a particular view of the application with its own logic and data. In AngularJS 1.0, there was the concept of controllers, $Scope, and directives to bind data and logic to […]
-
Exploring Attribute Directives in Angular
Attribute Directives are used to change the behavior, appearance or look of an element on a user input or via data from the service. Essentially, there are three types of directives in Angular: Component Structural directives Attribute directives In this post, we will learn how to create Attribute Directives in Angular . So let’s say […]
-
Different ways of injecting dependency in an AngularJS Application
When you start learning the very first characteristics of AngularJS, you may come across something called Dependency Injection (DI): the premise that AngularJS injects dependencies whenever an application needs them. As a developer, our task is only to pass the dependency to the module and everything else will be taken care by AngularJS. To create […]
-
What is a Provider () in AngularJS?
The provider() function allows us to create a configurable service where we can set input per application for the service created using the provider (). For example, if we need to set API key to access a service on the application level, we can set that in the module config and pass input to the […]
-
How to Create a YouTube AngularJS Directive
I have often seen, developers come across requirement to embed a YouTube video in an AngularJS application. In this post, we will learn to create a simple YouTube AngularJS directive and also to use some of the popular directive from the GitHub. We will follow step by step approach to create the YouTube custom directive. […]
-
How to create Custom Filters in AngularJS
Have you ever used filters with the ng-repeat directive as shown in the listing below? If so, then you’ve used a filter in an AngularJS application. AngularJS provides us many in-built directives like search. If required, AngularJS also allows us to create custom filters, which we’ll explore in this post. AngularJS gives us a simple […]
-
How to work with the Ignite UI Chart in an AngularJS application
In this post we will learn how to work with the Ignite UI chart in an AngularJS application. Although I will use the ASP.NET Web API to pull data from the database, you can use REST service or a Web API created on any stack with the Ignite UI charts in your AngularJS application. This […]
-
Validating User Input on a Form in Angular JS
I have often seen entry level developers struggling with user input validation in AngularJS single page applications. In this post, I will give a quick but useful introduction of validations in AngularJS; consider this post as a base learning document from which you can do further learning. Let’s start with an example as shown in […]