Posts Tagged 'AngularJS'

AngularJS Filter

In this post we’ll analyze the filter functionality provided us by AngularJS.

Filter is a way to format the data displayed. There are several built-in filter but we can create our own filters.

To invoke filters, in the HTML code, we have to use the pipe (|) inside the double braces ( {{ }} )

For example, in this way we’ll capitalize all characters of string:

// result: TODAY IS A BEAUTIFUL DAY
{{ 'Today is a beautiful day' | uppercase }}

Continue Reading →
0

Sharing data between controllers in AngularJS

I wrote this article to show how it can possible to pass data from one Controller to another one.

There are two ways to do it, using a service or exploiting depending parent/child relation between controller scopes.
In this post, we’ll analyze the last one method.

It is possible to send data from parent controller to a child controller and viceversa.
To transmit data from the FirstController to SecondController, which the scope of the first one is parent to the scope of ...

Continue Reading →
0

AngularJS: Custom validation with Directives

Lately I’ve developed Self-Host ASP.NET Web API for our client with AngularJS as JavaScript MVW Framework I had to prepare a page where there was the need to configure the IP addresses and validate them through the control if already entered.

To do this I used a AngularJS directive for a custom validation.

Directive have the following elements:

  • require: this element allows directive to interact with the controller of the page
  • link: this element allows directive to access to the DOM of the page and inside ...
Continue Reading →
0