Web Development

AngularJS tips for beginners

AngularJS is an open-source JavaScript framework which is owned by Google, to assist developers when creating single-page applications. AngularJS allow the use of HTML code as a ‘blue-print’ template and use pre-defined data-binding, form validation and DOM manipulation to assist in writing cleaner code and base everything on a framework, (e.g bootstrap).

Initializing our model app:

AngularJs allows us to name our model app, code below:

 <div ng-app="myApp">
    <div ng-view></div>
</div>

“myApp” is the name of our application that we are declaring, which you can name to what you like.

Creating hyperlinks:

Creating links in AngularJS is easy and can be accomplished by using ng-href.

<a ng-href src="/">This is our home page</a>
<a hg-href src="/about-us">This is our about-us page</a>

 Data-binding:

Data binding, is expressed in the form of{{}} and allows you to auto sync data between the view and application model. The code example below will display the value of coffee that is binded to the paragraph element.

 <p ng:bind=”coffee”></p>

Resources:

The angularJS website www.angularjs.org, is the ultimate source for learning more about the code base and framework; they also have a wide collection of code tutorials and modules which can be installed from Angular Modules, www.ngmodules.org.

About 

I operate my business Creative Website Designs. My specialties are in Web Development, Search Engine Optimization, Online Marketing, PHP, OpenText, HTML,CSS, JavaScript, Word press, and Joomla. I formally worked as a web developer and SEO Specialist for Bell Potter Securities, Exa and Arrows Internet Marketing.

    Find more about me on:
  • googleplus
  • facebook
  • twitter

Leave a Reply

Your email address will not be published. Required fields are marked *