Schogini is Magento2 ready. Are you?

Get started with Magento 2 | Need expert Magento2 support?

AngularJS - Getting Started


Date: 2015-11-03 | Category: AngularJS

AngularJS is a powerful javascript frameword for creating SPA (Single Page Application). It is faster, has excellent templating engine and it handles DOM masterfully.

AngularJS follows the MVC architecture. Its core features include : * Directives * Data Binding * Filters * Modules * Routes * Controllers

SPA - Single Page Application

A single page application(SPA) allows different views to be loaded inside the same page or shell page. It is like having a div and placing views inside it based on user interaction. It also maintains history. On back button action, it will automatically go to the previously loaded view. It mainly relies on the following technologies : * DOM manipulation * History * Routing * Ajax * Data Binding * More...

AngularJS for SPA

AngularJS is a full featured SPA framework. A lot of useful functionalities/properties like data binding, MVC architecture, routing, testing, templates, view models, factories, services, directives etc are built into it.

Hello World Application using AngularJS

Steps

A simple AngularJS application can be created in three steps :

  1. Reference/include angular.js to the html page.
  2. Add an 'ng-app' directive to the page/section.
  3. Bind data using directives.

Sample Code

First create a folder for your project and create an index.html file file. Now add the following code to your index.html file.

index.html <!doctype html> <html ng-app> <head> <title> AngularJS Hello World </title> </head> <body> Name : <input type="text" ng-model="name"/> <br/> Hello from <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.js"></script> </body> </html>

Now open the index.html file in a browser and see it working.

Conclusion

This will give you a brief idea on AngularJS, its capability and its use.

Schogini's customer service extends beyond the natural boundaries. ~ Timothy Johnson

Schogini assures 24x7 - 6 hour turn around ticket response time and 24 hour Email response time (support@schogini.com)