Monday 4 November 2013

AngularJS Simple Sample

I already gave some information about angularJs here :


First you surely need to read the above article , then come here ......


Okay cool ! Now we will go to build simple one angularJs Application .


My sample application created for Web-application , But you can do any type of application(windows,MVC Project) ,etc......

First add one index page in my application  and you need to just copy past the below code but , I will explain further details .

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" %>

<!DOCTYPE html>

<html ng-app>
<head runat="server">
    <title></title>
    <script src="Scripts/angular.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <label>Name:</label>
            <input type="text" ng-model="Name" placeholder="Enter a name here">
            <label>{{Name}}</label>           
        </div>
    </form>
</body>
</html>




The Above Green color codes are must important ..

where..

ng-app  - This keyword use for  Define Angular Js .

 <script src="Scripts/angular.min.js"></script> - Call angularJs in the Current Page .

 ng-model="Name"  - This is AngularJS Model Property (Just assume MVC Model property)

{{Name}} - Binding the model property value in a label . (Just Assume pass the MVC Model Property values to view)


Results are :

If you type any value in the textbox , It's display the below label( Like OnTextChanged Event process)

Okay ! Now you can create simple  angularJS application on yourself ,


10 comments:

  1. At Coepd (Center of Excellence for Professional Development) we practice Object-Oriented Programming concepts and mentor .Net Platform, C#.NET, ADO.NET which helps the attendees to build database-driven Web applications and Web Sites successfully. We also guide the attendees to develop web-based enterprise applications using ASP.NET and Visual Studio which comforts in developing the Web Services using .Net framework in Service-oriented Architecture. The Internship Program Also covers Frontend design technologies HTML, HTML5, CSS, CSS3, XML, Bootstrap, JQuery, Angular JS, and AJAX. Our collaborative ecosystem comprising of Partnerships with Software Companies enables real time software development life cycle experience.

    http://www.coepd.com/DotnetTraining.aspx

    ReplyDelete
  2. Hi, Thanks for a sharing a nice information of the blog.
    DOT NET Training Institutes in Ameerpet

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. This is an superior writing service point that doesn't always sink in within the context of the classroom. In the first superior writing service paragraph you either hook the reader's interest or lose it. Of course your teacher, who's getting paid to teach you how to write an good essay, 
    Authorized macbook pro service center in Chennai | Macbook pro service center in chennai | Authorized iMac service center in Chennai | iMac service center in chennai | Mac service center in chennai

    ReplyDelete
  5. Learn Business Analysis, Python, Machine Learning, Data Science, Blockchain, DevOps, Selenium 3.0, and Other In-Demand IT Skills from Global Experts.

    https://www.mcal.in/

    ReplyDelete
  6. Yes, you are right. The demand for game developers continuously rises as the tech world evolves and businesses become increasingly reliant on technology. You should check out Eiliana.com; they showcase your skills to the right people.

    ReplyDelete

If any doubt?then please comment in my post

How to reduce angular CLI build time

 Index: ----- I am using angular cli - 7 and I am going to tell how to reduce the build time as per my knowledge. Problem: -------- Now the ...