Tuesday 29 September 2015

How To Start With Angular JS

There are so many tutorials and videos for start up with angularjs. When I was started with angularjs I found that most of tutorials are too confusing.
So I am showing that How to create a basic app with angularjs.

What We Need For Startup

  1. Text Editor(sublime text, notepad++, dreamweaver)
  2. Browser (chrome, firefox),
  3. angularjs Library. You can download it from angularjs.org
Create a file named index.html and  create a initial html page.and attach  angularjs library in your html page. In this page I am showing you how the ng-model works and how to bind the data.Now you can see the results in the result tab of codepen demo. So for data binding we just need to add an angular library.
In Next Post I will let you know that How to create single page application using angular js.

<html ng-app="">  
 <head>  
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>  
 </head>  
 <body>  
   <p>First Name : <input type="text" ng-model="f_name" placeholder="First Name"></p>  
   <p>Last Name : <input type="text" ng-model="l_name" placeholder="LastName"></p>  
   <h1>Hello {{f_name}} {{l_name}}</h1>  
 </body>  
 </html>  
See the Pen jbyZQL by Love Trivedi (@lovetrivedi) on CodePen.

No comments:

Post a Comment