Skip to main content

Tutorial for understanding Angularjs




What is angualarjs ?

AngularJS is one of the most p
opular JavaScript UI framework which works on client side MVVM model. Here client side means using JavaScript we will create the MVVM. The main advantage here for the AngularJS is Two-way data binding. The two-way data binding is quite easy and simple by using AngularJS.

Main Component of Angularjs


What is Services ?
Services are singletons, which a
re objects that are instantiated only once per app (by the $injector). They provide an interface to keep together methods that relate to a specific function.

What is filters ?
Filters are added to angularjs expression or directives in order to transform the displayed data , they are use by pipe symbol (" | " ). example of filter :- currency Format a number to a currency format. date Format a date to a specified format. filter Select a subset of items from an array. json Format an object to a JSON string. limitTo Limits an array/string, into a specified number of elements/characters. lowercase Format a string to lower case. number Format a number to a string. orderBy Orders an array by an expression. uppercase Format a string to upper case.


Implementation of filter


<div ng-app="myApp" ng-controller="personCtrl">
<p>The name is {{ lastName | uppercase }}</p>
</div>

What is Directives ?
AngularJS directives are extended HTML attributes with the prefix ng-.
The ng-app directive initializes an AngularJS application.The ng-init directive initializes application data.The ng-model directive binds the value of HTML controls (input, select, textarea) to application data

default directives :-ng-repeat,ng-show,etc
How to make our directive ---
app.directive("rd", function() { return { template : "<h1>Made by a directive!</h1>" };});
form.html
these tag will return the templete which we return in directive<rd></rd>

Comments

Popular posts from this blog

What's New in Visual Studio 2017 RC

What's  New in Visual Studio 2017 RC We have many new as well as improved features and experiences in Visual Studio 2017  to make you more productive at things you do every day IntelliSense  IntelliSense comes enhanced with added filtering that makes it much easier to use . Filtering makes long lists much more manageable. With features like Camel Case search you only need to type in the 2 letters in capitals for IntelliSense to appropriately filter results for you that match 2 different words with those letters capitalized. IntelliSense is also smarter now; it will select the best matching result from the list instead of simply picking the top result. Navigation Navigation . Navigate To is much more powerful with better filtering and preview.  We have also fixed Find All Reference by adding color, grouping, and a peek preview in the Find All Ref window. Live editing One of the most useful features is l...

Claims Class For security in .NET4.5 with C#

What is Claim ? A claim in the world of authentication and authorization can be defined as a statement about an entity, typically a user. A claim can be very fine grained: Ram is an admin Ram’s email address is Ram@yahoo.com Ram lives in Mumbai Tom’s allowed to view sales figures between 2009 and 2012 Tom’s allowed to wipe out the universe Claims originate from a trusted entity other than the one that is being described. This means that it is not enough that Tom says that he is an administrator. If your company’s intranet runs on Windows then Tom will most likely figure in Active Directory/Email server/Sales authorisation system and it will be these systems that will hold these claims about Tom.  The idea is that if a trusted entity such as AD tells us things about Tom then we believe them a lot more than if Tom himself comes with the same claims . This external trusted entity is called an  Issuer . The KEY in the key-value pairs is called a  Typ...

Question must to read

What is the significance of the Finalize method in .NET? The .NET Garbage Collector does nearly all the clean up activity for your objects. But unmanaged resources (for example: Windows API created objects, File, Database connection objects, COM objects and so on) are outside the scope of the .NET Framework that we need to explicitly clean our resources. For these types of objects, the .NET Framework provides the "Object.Finalize" method, which can be overridden and to clean up the code for un-managed resources. Can it be put in this section? Why is it preferred to use it instead of Finalize for clean up? The problem with Finalize is that garbage collection must make two rounds to remove objects that have Finalize methods. The figure below will make things clearer regarding the two rounds of garbage collection rounds for the objects having finalized methods. Figure 1 In this scenario there are three objects, Object1, Object2 and Object3. Object2 has the Finali...