Tag: Angularjs
-
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…
-
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…
-
Exploring Angular’s “Controller as” Syntax and the vm Variable
Read full article on the Infragistics blog Often, I hear developers ask “What is the ‘controller as’ syntax and how it is different from the $scope object approach of controller creation?” In this post we will learn about controller as syntax and compare it with the $scope object approach of controller creation. In AngularJS 1.2,…
-
Understanding scopes in AngularJS custom Directives
Read full article on the Infragistics blog In this post we will learn about different kinds of scopes in AngularJS custom directives. First we’ll start with a high level introduction of directives and then focus on scopes. Directives Directives are one of the most important components of AngularJS 1.X, and have the following purposes: Gives…
-
A Step-by-Step Guide to Working with the ASP.NET Web API and AngularJS
Read full article on the Infragistics blog In this post we will learn to work with AngularJS and ASP.NET Web API in a step by step manner. I’ll assume that you are already familiar with some of the basic terms like what AngularJS and a Web API is, and we’ll work in a hands-on way,…