{"id":41,"date":"2016-02-24T12:12:19","date_gmt":"2016-02-24T06:42:19","guid":{"rendered":"http:\/\/new.codingislove.com\/?p=41"},"modified":"2018-03-28T17:46:19","modified_gmt":"2018-03-28T12:16:19","slug":"angularjs-for-complete-beginners","status":"publish","type":"post","link":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/","title":{"rendered":"AngularJS for complete beginners"},"content":{"rendered":"<p>AngularJS! One of the most popular javascript frameworks available today. Angular is widely used, be it an Intermediate web developer or enterprises like IBM, Paypal, Google etc everyone is using it. In fact AngularJS is maintained and supported by Google. <!--more--><\/p>\n<p>Due to its huge popularity, everyone wants to learn AngularJS but it has a steep learning curve because of its concepts like dependency injection, modules, controllers, services, models, 2-way data bindings etc which sound very hard and new for beginners.<\/p>\n<p>It is so confusing because of too many technical words used in AngularJS documentation and also in many tutorials which are found online. So I&#8217;m writing this post for all beginners who wants a simple tutorial with simple words which can help them get started with the mighty AngularJS.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/BC3NfEV.jpg\" alt=\"angularjs meme\" class=\"center-block\" \/><\/p>\n<h4>Prerequisites<\/h4>\n<p>Basic HTML &amp; Javascript knowledge would be enough to understand this tutorial.<\/p>\n<p>I love to learn by doing so I&#8217;ll be sharing examples along with code through out this tutorial.<\/p>\n<h4>Lets go!<\/h4>\n<p>Wait! but many beginners don&#8217;t know what exactly AngularJS does and where is it used in real life? &#8211;\u00a0 AngularJS helps in building web apps faster (web apps are nothing but web pages with added functionality and user interaction). By the end of this tutorial you will understand how it makes building apps faster and practical situations where AngularJS is used.<\/p>\n<h2>Getting started with AngularJS<\/h2>\n<p>Let me explain few concepts of Angular in simple words and then we&#8217;ll dive into actually using Angular.<\/p>\n<h4>Modules<\/h4>\n<p>A Module is just a container of some Javascript code. Modules are used mainly to organize your Javascript code. Every angular app should have <strong>at least one module<\/strong>.<\/p>\n<p>Example : If you are building a webapp like facebook then you can organize your Javascript by having code for profile in &#8216;Profile&#8217; module,\u00a0 code for newsfeed in &#8216;NewsFeed&#8217; module etc.<\/p>\n<h3>Controller<\/h3>\n<p>A controller is just a sub container with additional functionalities.<\/p>\n<p>Example (building a webapp like facebook) : Javascript code for liking, commenting, sharing posts on newsfeed would be placed in &#8216;PostController&#8217; and code for displaying ads would be placed in &#8216;AdsController&#8217;<\/p>\n<p><strong>$scope <\/strong>is an important object in a controller. <strong>$scope<\/strong> is the object which contains all the data of a controller. Each controller has its own scope, data in scope is available only to that particular controller. So &#8216;PostController&#8217; cannot access scope of &#8216;AdsController&#8217;<\/p>\n<h3>Dependencies<\/h3>\n<p>dependencies are objects which are required by a controller, we specify all the dependencies required when creating a controller.<\/p>\n<p>Example : to use $scope in a controller, we specify it as dependency and then use it in controller. This concept would be clear once we start creating a controller in next few steps.<\/p>\n<h3>Directives<\/h3>\n<p>A directive is like an add-on for HTML elements. directives provide additional functionality to your HTML elements. There are many Angular directives and each directive has a different use.\u00a0 We&#8217;ll be talking about few directives later in this tutorial.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.nikola-breznjak.com\/blog\/wp-content\/uploads\/2014\/11\/howDoesThisEvenWork.jpg\" alt=\"angularjs meme\" class=\"center-block\" \/><\/p>\n<h2>Putting the pieces together<\/h2>\n<p>Now that we know few basics of AngularJS lets dive into creating an angular app!<\/p>\n<p>I&#8217;m using <a href=\"http:\/\/codepen.io\" target=\"_blank\" rel=\"nofollow\">codepen.io<\/a> to write HTML,CSS,JS and see the result live in browser. you can start writing code along with this tutorial as the steps are being explained. go to codepen.io, create a new pen and use this basic html below and then follow next steps.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=&quot;UTF-8&quot; \/&gt;\r\n  &lt;title&gt;My first angular app&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div&gt;Hello World!&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<h3>Steps involved in creating an Angular app :<\/h3>\n<p class=\"prettyprint linenums nocode ng-scope\"><strong>1. Add AngularJS to your HTML page using script tag<\/strong><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.4.9\/angular.min.js&quot;&gt;&lt;\/script&gt;<\/pre>\n<p class=\"prettyprint linenums nocode ng-scope\"><strong>2. Create a module<\/strong><\/p>\n<p>syntax for creating a module :<\/p>\n<pre>angular.module(\u2018modulename\u2019,[]);<\/pre>\n<p>lets create a module and assign it to a variable<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">var myApp = angular.module('myApp',&#x5B;]);<\/pre>\n<p><strong>3. Create a controller<\/strong> <\/p>\n<p>syntax for creating a controller :<\/p>\n<pre>Module.controller(\u2018controllername\u2019,[dependencies,function(dependency variables){\n}]);<\/pre>\n<p>lets create a controller and also use $scope object to store some data lets say app name. we need $scope object so it should be specified as a dependency.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nmyApp.controller('MainController', &#x5B;'$scope',function($scope){\r\n$scope.appname = &quot;Awesome app&quot;;\r\n}]);\r\n<\/pre>\n<p><strong>4. Start angular <\/strong><\/p>\n<p>we can start AngularJS by specifying the main module using ng-app directive in &lt;html&gt; tag of your HTML file.<br \/>\nsyntax for ng-app directive :<\/p>\n<pre>&lt;html ng-app=\"modulename\"&gt;<\/pre>\n<p>Name of module we created is &#8216;myApp&#8217; so we specify myApp as main module :<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;html ng-app=&quot;myApp&quot;&gt;<\/pre>\n<p>Also lets add controller to body element using ng-controller directive. ng-controller directive lets a html element access the data in that controller. we are adding contoller to body element so whole body has access to controller&#8217;s data.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;body ng-controller=&quot;MainController&quot;&gt;<\/pre>\n<p><em>These are the basic steps to create an angular app.<\/em> Now lets use some data to test if AngularJS is working.<\/p>\n<p>We have defined appname varibale in scope of main controller, To access scope data in html angularjs has a special markup! requried variable has to be wrapped with in &#8216;{{&#8216; and &#8216;}}&#8217; To access appname variable we can use {{appname}}<\/p>\n<p>Add a &lt;p&gt; tag with welcome to {{appname}} as below and result should be welcome to Awesome app<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;p&gt;welcome to {{appname}}&lt;\/p&gt;<\/pre>\n<p>If something went wrong then cross check with code below : <\/p>\n<p><p class='codepen'  data-height='200' data-theme-id='0' data-slug-hash='YwmjJp' data-default-tab='result' data-animations='run' data-editable='' data-embed-version='2'>\nSee the Pen How to create basic angular app by Ranjith (@Ranjithkumar10) on CodePen.<\/p>\n<br \/>\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><\/p>\n<div style=\"text-align:center;\"><ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:300px;height:250px\"\n     data-ad-client=\"ca-pub-6724251756140624\"\n     data-ad-slot=\"4326164198\"><\/ins><\/div>\n<p><script>\n(adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n<h2>Diving deeper into Angular<\/h2>\n<p>Let get into few more concepts like 2 way data binding,filters along with few commonly used directives.<\/p>\n<h3>2-way data binding<\/h3>\n<p>In simple words, angular allows us to change data both in html and javascript. Also change in one place is reflected in another place.<br \/>\nRefer example below.<br \/>\n<p class='codepen'  data-height='268' data-theme-id='0' data-slug-hash='YwmdRL' data-default-tab='result' data-animations='run' data-editable='' data-embed-version='2'>\nSee the Pen AngularJS 2-way data binding by Ranjith (@Ranjithkumar10) on CodePen.<\/p>\n<br \/>\nIf you type your name in the textbox, it instantly updates your name in the next div! Have a look at html.<\/p>\n<p><strong>ng-model<\/strong> directive is used to bind value of a textbox,radio button,select dropdown etc.<\/p>\n<p>I used ng-model directive to bind the value of text box to variable named &#8220;yourname&#8221; and then used the same variable in next div using angular markup {{yourname}}<\/p>\n<p><strong>whats happening here?<\/strong><\/p>\n<p>When you type name, angular updates &#8216;yourname&#8217; variable, &#8216;yourname&#8217; variable is changed so the div which uses &#8216;yourname&#8217; variable also changes!<\/p>\n<p>If you change &#8216;yourname&#8217; variable in javascript, textbox value and div text also will be changed! This is 2 way data binding. we can change data in both html(view) and javascript(model), one change will be automatically reflected in another. we need not write code for updating data, we just tell angular which element depends on which data and angular does all the work for you!<\/p>\n<h3>ng-repeat directive<\/h3>\n<p>ng-repeat, The most useful directive in angularJS. This directive is used when there is data which need repetitive HTML elements. ng-repeat can be used with any html element, syntax is as follows :<\/p>\n<pre>&lt;div ng-repeat=\"item in array\"&gt;&lt;\/div&gt;<\/pre>\n<p>example : $scope.friendslist = [&#8220;name1&#8243;,&#8221;name2&#8243;,&#8221;name3&#8243;,&#8221;name4&#8221;] then display friends in html using :<\/p>\n<pre>&lt;ul&gt;&lt;li ng-repeat=\"friend in friendslist\"&gt;{{friend}}&lt;\/li&gt;&lt;\/ul&gt;<\/pre>\n<p>check result below<br \/>\n<p class='codepen'  data-height='268' data-theme-id='0' data-slug-hash='GZRKVK' data-default-tab='result' data-animations='run' data-editable='' data-embed-version='2'>\nSee the Pen ng-repeat example by Ranjith (@Ranjithkumar10) on CodePen.<\/p>\n<\/p>\n<h3>Filters<\/h3>\n<p>Filters in AngularJS are used to format data. some useful filters are as follows :<\/p>\n<ol>\n<li>currency : formats a number to currency format<\/li>\n<li>date : formats a date to specific format<\/li>\n<li>lowercase : formats a string to lower case<\/li>\n<li>uppercase : formats a string to upper case<\/li>\n<li>json : formats an object to json string<\/li>\n<\/ol>\n<p>syntax is as follows :<\/p>\n<pre>\n&lt;div&gt;{{mydata | currency}}&lt;\/div&gt;\n&lt;div&gt;{{mydata | date:'yyyy-MM-dd'}}&lt;\/div&gt;\n<\/pre>\n<h3>ngRoute module : <\/h3>\n<p>AngularJS is a powerful framework which can also control routes and views of an app. you can have multiple routes and assign views to routes using ngRoute module.<\/p>\n<p>example : if your app URL is http:\/\/myapp.com\/ then routes would be http:\/\/myapp.com\/home, http:\/\/myapp.com\/profile and content in these routes can also be managed using ngRoute module.<\/p>\n<p>usage :<br \/>\nfirst add ngRoute using script tag (ngRoute is a separate module from angularJS version 1.1.6)<\/p>\n<pre>&lt;script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.5.0\/angular-route.min.js\"&gt;&lt;\/script&gt;<\/pre>\n<p>add ngRoute module as dependency to main module<\/p>\n<pre>var myApp = angular.module('myApp',['ngRoute']);<\/pre>\n<p>configure routes using config function by adding $routeProvider and $locationProvider as dependencies<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nmyApp.config(&#x5B;'$routeProvider', '$locationProvider', function($routeProvider,$locationProvider){\r\n$routeProvider\r\n  .when('\/home', {\r\n    templateUrl: 'home.html'\r\n  })\r\n  .when('\/profile', {\r\n     templateUrl: 'profile.html'\r\n  })\r\n  .when('\/settings', {\r\n     templateUrl: 'settings.html'\r\n  });\r\n  $routeProvider.otherwise( { redirectTo: '\/home' });\r\n  $locationProvider.html5Mode(true);\r\n}]);\r\n<\/pre>\n<p>add ng-view directive<\/p>\n<pre>&lt;div ng-view&gt;&lt;div&gt;<\/pre>\n<p>In the code above, when URL is myapp.com\/home then content from home.html is injected into div with ng-view directive. same with profile and settings, if route is other than specified routes in config function then redirected to \/home.<\/p>\n<p>home.html, profile.html,settings.html can be uploaded as separate html files, they can also be used as inline templates which is very useful for a single page app and explained in next section of this tutorial.<br \/>\nLets develop a Movie DVD store app using angularJS to apply all the concepts learned in this tutorial.<\/p>\n<p><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<!-- post ad 2 --><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-client=\"ca-pub-6724251756140624\"\n     data-ad-slot=\"7279630595\"\n     data-ad-format=\"auto\"><\/ins><\/p>\n<p><script>\n(adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n<h2>The fun part &#8211; Developing a Movie DVD store app <\/h2>\n<p>We are going to develop an app which shows a list of movie DVDs, prices of DVDs for purchase and rent. user can select preferred DVD then moves to a confirmation page then a checkout page for payment and finally a thankyou page  for showing successful transaction.<\/p>\n<p>List of movie names, image URL, price, storyline are stored in a json file for this app. usually apps have a backend storage where all data is stored in a database.<\/p>\n<p>As this tutorial is all about AngularJS and not about backend I&#8217;ve saved data in JSON and stored in a site called myjson.com which gives a unique URL for each JSON saved from which JSON data can be fetched.<\/p>\n<p>I&#8217;ve used bootstrap for quickly styling the app. I wont be talking about styling in this tutorial. you can read more about bootstrap <a href=\"http:\/\/getbootstrap.com\/\" target=\"_blank\" rel=\"nofollow\">here<\/a><\/p>\n<p>View live demo of app here &#8211; <a target=\"_blank\"href=\"http:\/\/codepen.io\/Ranjithkumar10\/full\/LNPREZ\/\">Movie DVD store using AngularJS<\/a><\/p>\n<p><strong>Lets start app development step by step :<\/strong><\/p>\n<p>1.Add AngularJS using script tag, create a module, use basic html and start angular using ng-app directive<\/p>\n<pre>&lt;script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.5.0\/angular.min.js\"&gt;&lt;\/script&gt;<\/pre>\n<pre>var myApp = angular.module('myApp',[]);<\/pre>\n<pre>&lt;html ng-app=\"myApp\"&gt;<\/pre>\n<p>2.Add a controller with following dependencies $scope, $http, $location. $scope is used to store data, $http is used to make HTTP request to fetch json data, $location is used to change routes and URL.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nmyApp.controller('DataController', &#x5B;'$scope', '$http', '$location', function($scope, $http, $location) {\r\n\r\n}]);\r\n<\/pre>\n<p>Add controller to body using ng-controller directive. We are using only one controller for whole app because this is a simple app and purely for learning purpose.<\/p>\n<pre>&lt;body ng-controller=\"DataController\"&gt;<\/pre>\n<p>3.Fetch movies data and set it to scope. $http service is used to fetch JSON data. JSON data is available at <a href=\"https:\/\/api.myjson.com\/bins\/4khft\" rel=\"nofollow\" target=\"_blank\">https:\/\/api.myjson.com\/bins\/4khft<\/a><br \/>\nThis JSON is an array of objects and each object has movie name,image,buy price,rent price,storyline properties.<\/p>\n<p>Ater getting JSON, set it to &#8216;$scope.movies&#8217;. http request may take a second or few seconds to load depending on the server speed and home page is shown blank till the request is complete as we are displaying movies list on homepage, so we should let the user know that data is being loaded using a loading image.<\/p>\n<p>I added a loading image to main HTML file with ng-hide directive. ng-hide shows or hides an element based on the expression or variable in ng-hide. if variable is true then element is hidden, else element is unhidden. check code below :<\/p>\n<pre>&lt;img ng-hide=\"loaded\" src=\"http:\/\/imgh.us\/ring.gif\" \/&gt;<\/pre>\n<p><strong>$scope.loaded<\/strong> variable is added in DataController as $scope.loaded = false and set to true when data is loaded. so loading image is displayed until data is being loaded and hidden once data is loaded.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$scope.loaded = false;\r\n$http.get('https:\/\/api.myjson.com\/bins\/54jf7').success(function(data){\r\n  $scope.movies = data;\r\n  $scope.loaded = true;\r\n});\r\n<\/pre>\n<p>4. configuring routes &#8211; we have the data, now lets configure routes and add templates with content for each route. This app need 4 routes, one for home with list of movies, one for confirm purchase, one for checkout and one for thankyou page.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nmyApp.config(&#x5B;'$routeProvider', '$locationProvider', function($routeProvider,$locationProvider){\r\n$routeProvider\r\n  .when('\/home', {\r\n    templateUrl: 'home.html'\r\n  })\r\n  .when('\/confirm', {\r\n     templateUrl: 'confirm.html'\r\n  })\r\n  .when('\/checkout', {\r\n     templateUrl: 'checkout.html'\r\n  })\r\n  .when('\/thankyou', {\r\n     templateUrl: 'thankyou.html'\r\n  });\r\n  $routeProvider.otherwise( { redirectTo: '\/home' });\r\n  $locationProvider.html5Mode({\r\n  enabled: true,\r\n  requireBase: false\r\n});\r\n}]);\r\n<\/pre>\n<p>5. adding templates &#8211; This time we are using inline templates which means templates for each route are present in the same html file.<br \/>\nInline templates are used by adding script tag with <strong>type=&#8221;text\/ng-template&#8221;<\/strong> and <strong>id=&#8221;templatename.html&#8221;<\/strong><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;script type=&quot;text\/ng-template&quot; id=&quot;home.html&quot;&gt;\r\n&lt;div ng-repeat=&quot;movie in movies&quot; class=&quot;col-sm-12 col-lg-3 col-md-6&quot;&gt;\r\n    &lt;div class=&quot;thumbnail&quot;&gt;\r\n      &lt;img class=&quot;poster&quot; ng-src=&quot;{{movie.image}}&quot;&gt;\r\n      &lt;div class=&quot;caption text-center&quot;&gt;\r\n        &lt;h4&gt;{{movie.name}}&lt;\/h4&gt;\r\n        &lt;p&gt;&lt;a ng-click=&quot;buy(movie)&quot; class=&quot;btn btn-primary&quot; role=&quot;button&quot;&gt;Buy - {{movie.buy | currency:&quot;$&quot;:0}}&lt;\/a&gt; &lt;a ng-click=&quot;rent(movie)&quot;class=&quot;btn btn-default&quot; role=&quot;button&quot;&gt;Rent - {{movie.rent | currency:&quot;$&quot;:0}}&lt;\/a&gt;&lt;\/p&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>The above code is template for \/home route. ng-repeat directive is used to iterate through list of movies in $scope.movies and display movie name, image, buy button with buy price,rent button with rent price.<\/p>\n<p>Currency filter is used on buy button text and rent button text to format with &#8216;$&#8217; sign. ng-click directive is used on buttons to bind a click event which runs buy() function when button is clicked and also sends a specific movie object as parameter which will be used in the function. we have to define buy() and rent() functions in DataController<\/p>\n<p>Adding functions : We need functions for buy button, rent button, checkout button in next page and pay button in the final page. These functions are used to set the movie which user wants to buy to &#8216;selectedMovie&#8217; variable and change route to next page.<\/p>\n<p>I&#8217;ve added a status variable which tracks whether user wants to buy or rent a movie and a shipping variable which has shipping cost. for simplicity we are using fixed shipping cost for all transactions.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$scope.buy = function(movie){\r\n    $scope.status = &quot;buy&quot;\r\n    $scope.selectedMovie = movie;\r\n      $location.path('\/confirm');\r\n    };\r\n  $scope.rent = function(movie){\r\n    $scope.status = &quot;rent&quot;\r\n    $scope.selectedMovie = movie;\r\n      $location.path('\/confirm');\r\n  };\r\n  $scope.checkout = function() {\r\n    $location.path('\/checkout');\r\n  }\r\n  $scope.pay = function(){\r\n    $location.path('\/thankyou')\r\n  };\r\n  $scope.shipping = 2;\r\n<\/pre>\n<p>Adding confirm page template :<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n  &lt;script type=&quot;text\/ng-template&quot; id=&quot;confirm.html&quot;&gt;\r\n    &lt;ol class=&quot;breadcrumb&quot;&gt;\r\n    &lt;li&gt;&lt;a href=&quot;home&quot;&gt;Home&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a href=&quot;confirm&quot;&gt;Buy {{selectedMovie.name}}&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;\/ol&gt;\r\n    &lt;h2&gt;{{status === 'buy' ? 'Confirm DVD purchase':'Confirm rental purchase'}}&lt;\/h2&gt;\r\n    &lt;hr \/&gt;\r\n    &lt;div class=&quot;row&quot;&gt;\r\n    &lt;div class=&quot;col-lg-3&quot;&gt;&lt;img ng-src=&quot;{{selectedMovie.image}}&quot;&gt;\r\n      &lt;h4&gt;{{selectedMovie.name}}&lt;\/h4&gt;\r\n      &lt;\/div&gt;\r\n      &lt;div class=&quot;col-lg-6&quot;&gt;\r\n        &lt;h4 class=&quot;storyline&quot;&gt;Storyline&lt;\/h4&gt;\r\n        &lt;p&gt;{{selectedMovie.storyline}}&lt;\/div&gt;\r\n      &lt;div class=&quot;col-lg-3&quot;&gt;\r\n        &lt;div class=&quot;row&quot;&gt;\r\n        &lt;div class=&quot;col-lg-6&quot;&gt;Price :&lt;\/div&gt;\r\n          &lt;div class=&quot;col-lg-6&quot;&gt;&lt;span class=&quot;pull-right&quot;&gt;{{status==='buy'?selectedMovie.buy:selectedMovie.rent}}&lt;\/span&gt;&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=&quot;row&quot;&gt;\r\n        &lt;div class=&quot;col-lg-6&quot;&gt;shipping :&lt;\/div&gt;\r\n          &lt;div class=&quot;col-lg-6&quot;&gt;&lt;span class=&quot;pull-right&quot;&gt;{{shipping | currency}}&lt;\/span&gt;&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;hr \/&gt;\r\n        &lt;div class=&quot;row&quot;&gt;\r\n        &lt;div class=&quot;col-lg-6&quot;&gt;Total :&lt;\/div&gt;\r\n        &lt;div class=&quot;col-lg-6&quot;&gt;&lt;span class=&quot;pull-right&quot;&gt;{{status==='buy'?selectedMovie.buy + shipping :selectedMovie.rent + shipping | currency}}&lt;\/span&gt;&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;hr \/&gt;\r\n        &lt;div class=&quot;row&quot;&gt;\r\n          &lt;div class=&quot;col-lg-12&quot;&gt;&lt;button class=&quot;btn btn-primary pull-right&quot; ng-click=&quot;checkout()&quot;&gt;checkout&lt;\/button&gt;&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/script&gt;\r\n<\/pre>\n<p>Things to note in the above template:<br \/>\n1.we have set selectedMovie variable when user clicks buy or rent, that variable is used now for displaying selected movie name and storyline in lines 4 and 13.<\/p>\n<p>2.we have set status variable to buy or rent when user clicks buy or rent, In line 6 Confirm DVD purchase is displayed when status is buy and Confirm rental purchase is displayed when status is rent, same with the price in line 18.<\/p>\n<p>3.In line 27, total cost is displayed by adding buy price or rent price with shipping cost and dispalyed. checkout() function is binded to checkout button which takes user to checkout page.<\/p>\n<p>Adding checkout template :<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;script type=&quot;text\/ng-template&quot; id=&quot;checkout.html&quot;&gt;\r\n     &lt;ol class=&quot;breadcrumb&quot;&gt;\r\n    &lt;li&gt;&lt;a href=&quot;home&quot;&gt;Home&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;li&gt;&lt;a href=&quot;confirm&quot;&gt;Buy {{selectedMovie.name}}&lt;\/a&gt;&lt;\/li&gt;\r\n       &lt;li&gt;&lt;a href=&quot;checkout&quot;&gt;checkout&lt;\/a&gt;&lt;\/li&gt;\r\n    &lt;\/ol&gt;\r\n    &lt;div class=&quot;row&quot;&gt;\r\n    &lt;div class=&quot;col-md-4&quot;&gt;&lt;\/div&gt;\r\n      &lt;div class=&quot;col-md-4&quot;&gt;\r\n      &lt;form&gt;\r\n            &lt;div class='form-row'&gt;\r\n              &lt;div class='col-xs-12 form-group required'&gt;\r\n                &lt;label class='control-label'&gt;Name on Card&lt;\/label&gt;\r\n                &lt;input class='form-control' size='4' type='text' value=&quot;John doe&quot;&gt;\r\n              &lt;\/div&gt;\r\n            &lt;\/div&gt;\r\n            &lt;div class='form-row'&gt;\r\n              &lt;div class='col-xs-12 form-group card required'&gt;\r\n                &lt;label class='control-label'&gt;Card Number&lt;\/label&gt;\r\n                &lt;input autocomplete='off' class='form-control' size='20' type='text' value=&quot;4234 5678 9423 8765&quot;&gt;\r\n              &lt;\/div&gt;\r\n            &lt;\/div&gt;\r\n            &lt;div class='form-row'&gt;\r\n              &lt;div class='col-xs-4 form-group cvc required'&gt;\r\n                &lt;label class='control-label'&gt;CVC&lt;\/label&gt;\r\n                &lt;input autocomplete='off' class='form-control card-cvc' placeholder='ex. 311' value='311' size='4' type='text'&gt;\r\n              &lt;\/div&gt;\r\n              &lt;div class='col-xs-4 form-group expiration required'&gt;\r\n                &lt;label class='control-label'&gt;Expiration&lt;\/label&gt;\r\n                &lt;input class='form-control card-expiry-month' placeholder='MM' size='2' type='text' value='08'&gt;\r\n              &lt;\/div&gt;\r\n              &lt;div class='col-xs-4 form-group expiration required'&gt;\r\n                &lt;label class='control-label'&gt; &lt;\/label&gt;\r\n                &lt;input class='form-control card-expiry-year' placeholder='YYYY' size='4' type='text' value='2036'&gt;\r\n              &lt;\/div&gt;\r\n            &lt;\/div&gt;\r\n            &lt;div class='form-row'&gt;\r\n              &lt;div class='col-md-12'&gt;\r\n                &lt;div class='form-control total btn btn-info'&gt;\r\n                  Total:\r\n                  &lt;span class='amount'&gt;{{status ==='buy'?selectedMovie.buy + shipping : selectedMovie.rent + shipping | currency}}&lt;\/span&gt;\r\n                &lt;\/div&gt;\r\n              &lt;\/div&gt;\r\n            &lt;\/div&gt;\r\n            &lt;div class='form-row'&gt;\r\n              &lt;div class='col-md-12 form-group'&gt;\r\n                &lt;button class='form-control btn btn-primary submit-button' ng-click=&quot;pay()&quot;&gt;Pay \u00bb&lt;\/button&gt;\r\n              &lt;\/div&gt;\r\n            &lt;\/div&gt;\r\n          &lt;\/form&gt;\r\n       &lt;\/div&gt; \r\n    &lt;div class=&quot;col-md-4&quot;&gt;&lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/script&gt;\r\n<\/pre>\n<p>Add checkout template and thankyou template :<br \/>\ncheckout template has just a form where user can enter credit card details and a pay button which would navigate to next page which shows thank you for purchasing along with movie name. movie name is again displayed using selectedMovie.name<\/p>\n<p>Have a look at complete source code here : <a href=\"http:\/\/codepen.io\/Ranjithkumar10\/pen\/LNPREZ\" target=\"_blank\" rel=\"nofollow\">Movie DVD store source code<\/a><\/p>\n<p class='codepen'  data-height='300' data-theme-id='0' data-slug-hash='LNPREZ' data-default-tab='result' data-animations='run' data-editable='' data-embed-version='2'>\nSee the Pen Movie dvd store using AngularJS \u2013 Tutorial by Ranjith (@Ranjithkumar10) on CodePen.<\/p>\n\n<p>This app is purely for learning angualrJS and doesn&#8217;t include any backend and payment integration. With this we have completed developing a simple store app using angularJS.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme-300x300.jpg\" alt=\"angularjs_meme\" width=\"300\" height=\"300\" class=\"alignnone size-medium wp-image-166 center-block\" srcset=\"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme-300x300.jpg 300w, https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme-150x150.jpg 150w, https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg 400w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2>Wrapping up<\/h2>\n<p>This was a long tutorial and we&#8217;ve come to an end. There is a lot more that can be done with AngularJS. I tried to explain commonly used concepts and directives of angularJS so that beginners can have a quick start. You can always refer AngularJS official documentation to explore more concepts &#8211; <a href=\"https:\/\/docs.angularjs.org\/api\" target=\"_blank\" rel=\"nofollow\">AngularJS docs<\/a><\/p>\n<p><em>If you have any questions or feedback, comment below.<\/em><br \/>\n<script>(function() {\n\twindow.mc4wp = window.mc4wp || {\n\t\tlisteners: [],\n\t\tforms: {\n\t\t\ton: function(evt, cb) {\n\t\t\t\twindow.mc4wp.listeners.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tevent   : evt,\n\t\t\t\t\t\tcallback: cb\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n})();\n<\/script><!-- Mailchimp for WordPress v4.10.7 - https:\/\/wordpress.org\/plugins\/mailchimp-for-wp\/ --><form id=\"mc4wp-form-1\" class=\"mc4wp-form mc4wp-form-177 mc4wp-form-theme mc4wp-form-theme-red\" method=\"post\" data-id=\"177\" data-name=\"Subscribe to Coding is Love\" ><div class=\"mc4wp-form-fields\"><p>\r\n  <strong><a style=\"cursor:pointer\" onclick=\"OneSignal.push(function() {OneSignal.registerForPushNotifications()});\">Get notified when there's a new post by clicking on<img decoding=\"async\" style=\"transform:scale(0.75,0.75)\" src=\"https:\/\/i.imgur.com\/lTEcCYt.png\" alt=\"notification-bell\"\/>in bottom left<\/a><\/strong>\r\n<\/p>\r\n\r\n<p>\r\n  <strong>Need some help? Post your questions on our <a href=\"https:\/\/forum.codingislove.com\" target=\"_blank\">forum<\/a><\/strong>\r\n<\/p>\r\n<!--<br>\r\n<script id=\"mNCC\" language=\"javascript\">\r\n   medianet_width = \"300\";\r\n   medianet_height = \"250\";\r\n   medianet_crid = \"892699656\";\r\n   medianet_versionId = \"111299\";\r\n   (function() {\r\n       var isSSL = 'https:' == document.location.protocol;\r\n       var mnSrc = (isSSL ? 'https:' : 'http:') + '\/\/contextual.media.net\/nmedianet.js?cid=8CUWS5M33' + (isSSL ? '&https=1' : '');\r\n       document.write('<scr' + 'ipt type=\"text\/javascript\" id=\"mNSC\" src=\"' + mnSrc + '\"><\/scr' + 'ipt>');\r\n   })();\r\n<\/script>\r\n<p>\r\n    Liked this post? Join our newsletter to get more stuff like this in your inbox.\r\n<\/p>\r\n<p>\r\n\t<label>Email address: <\/label>\r\n\t<input type=\"email\" name=\"EMAIL\" placeholder=\"Your email is safe with us!\" required \/>\r\n<\/p>\r\n<p>\r\n\t<input type=\"submit\" value=\"Sign up\" \/>\r\n<\/p>\r\n--><\/div><label style=\"display: none !important;\">Leave this field empty if you're human: <input type=\"text\" name=\"_mc4wp_honeypot\" value=\"\" tabindex=\"-1\" autocomplete=\"off\" \/><\/label><input type=\"hidden\" name=\"_mc4wp_timestamp\" value=\"1775394073\" \/><input type=\"hidden\" name=\"_mc4wp_form_id\" value=\"177\" \/><input type=\"hidden\" name=\"_mc4wp_form_element_id\" value=\"mc4wp-form-1\" \/><div class=\"mc4wp-response\"><\/div><\/form><!-- \/ Mailchimp for WordPress Plugin --><\/p>\n<div style=\"margin-top: 15px; margin-bottom: 15px;\" class=\"sharethis-inline-share-buttons\" ><\/div>","protected":false},"excerpt":{"rendered":"<p>AngularJS! One of the most popular javascript frameworks available today. Angular is widely used, be it an Intermediate web developer or enterprises like IBM, Paypal,&hellip; <\/p>\n","protected":false},"author":1,"featured_media":166,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[9,8,10],"class_list":["post-41","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-angularjs","tag-coding","tag-javascript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AngularJS for complete beginners - Coding is Love<\/title>\n<meta name=\"description\" content=\"A simple and effective tutorial with simple words which can help\u00a0beginners\u00a0get started with the mighty AngularJS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AngularJS for complete beginners\" \/>\n<meta property=\"og:description\" content=\"AngularJS! One of the most popular javascript frameworks available today. Angular is widely used, be it an Intermediate web developer or enterprises like IBM, Paypal, Google etc everyone is using it. Of course AngularJS is maintained and supported by Google. Due to...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/\" \/>\n<meta property=\"og:site_name\" content=\"Coding is Love\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/codingislove\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ranjithkumar10\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-24T06:42:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-28T12:16:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_yay.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"226\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ranjith kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"AngularJS for complete beginners\" \/>\n<meta name=\"twitter:description\" content=\"AngularJS! One of the most popular javascript frameworks available today. Angular is widely used, be it an Intermediate web developer or enterprises like IBM, Paypal, Google etc everyone is using it. Of course AngularJS is maintained and supported by Google. Due to...\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_yay.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@codingislove\" \/>\n<meta name=\"twitter:site\" content=\"@codingislove\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ranjith kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/\"},\"author\":{\"name\":\"Ranjith kumar\",\"@id\":\"https:\/\/codingislove.com\/#\/schema\/person\/ecb142505163b016d59bfbe662af587e\"},\"headline\":\"AngularJS for complete beginners\",\"datePublished\":\"2016-02-24T06:42:19+00:00\",\"dateModified\":\"2018-03-28T12:16:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/\"},\"wordCount\":3518,\"commentCount\":27,\"publisher\":{\"@id\":\"https:\/\/codingislove.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg\",\"keywords\":[\"Angularjs\",\"coding\",\"Javascript\"],\"articleSection\":[\"Coding Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/\",\"url\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/\",\"name\":\"AngularJS for complete beginners - Coding is Love\",\"isPartOf\":{\"@id\":\"https:\/\/codingislove.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg\",\"datePublished\":\"2016-02-24T06:42:19+00:00\",\"dateModified\":\"2018-03-28T12:16:19+00:00\",\"description\":\"A simple and effective tutorial with simple words which can help\u00a0beginners\u00a0get started with the mighty AngularJS.\",\"breadcrumb\":{\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#primaryimage\",\"url\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg\",\"contentUrl\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg\",\"width\":400,\"height\":400,\"caption\":\"angularjs_meme\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Coding is Love\",\"item\":\"https:\/\/codingislove.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Coding Tutorials\",\"item\":\"https:\/\/codingislove.com\/category\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"AngularJS for complete beginners\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codingislove.com\/#website\",\"url\":\"https:\/\/codingislove.com\/\",\"name\":\"Coding is Love\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/codingislove.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codingislove.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codingislove.com\/#organization\",\"name\":\"Coding is Love\",\"url\":\"https:\/\/codingislove.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codingislove.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2015\/12\/codinglovenew.png\",\"contentUrl\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2015\/12\/codinglovenew.png\",\"width\":300,\"height\":225,\"caption\":\"Coding is Love\"},\"image\":{\"@id\":\"https:\/\/codingislove.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/codingislove\/\",\"https:\/\/x.com\/codingislove\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codingislove.com\/#\/schema\/person\/ecb142505163b016d59bfbe662af587e\",\"name\":\"Ranjith kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codingislove.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f5486247269539c638227e6213187139cc7460eeb16d789fa757485f1d2b87f0?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f5486247269539c638227e6213187139cc7460eeb16d789fa757485f1d2b87f0?s=96&d=wavatar&r=g\",\"caption\":\"Ranjith kumar\"},\"description\":\"A CA- by education, self taught coder by passion, loves to explore new technologies and believes in learn by doing.\",\"sameAs\":[\"https:\/\/www.facebook.com\/ranjithkumar10\",\"https:\/\/www.instagram.com\/livin_on_d_edge\/\",\"https:\/\/www.linkedin.com\/in\/ranjithkumar10\",\"https:\/\/www.youtube.com\/c\/codingislove01\"],\"url\":\"https:\/\/codingislove.com\/author\/ranjithkumar10\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AngularJS for complete beginners - Coding is Love","description":"A simple and effective tutorial with simple words which can help\u00a0beginners\u00a0get started with the mighty AngularJS.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/","og_locale":"en_US","og_type":"article","og_title":"AngularJS for complete beginners","og_description":"AngularJS! One of the most popular javascript frameworks available today. Angular is widely used, be it an Intermediate web developer or enterprises like IBM, Paypal, Google etc everyone is using it. Of course AngularJS is maintained and supported by Google. Due to...","og_url":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/","og_site_name":"Coding is Love","article_publisher":"https:\/\/facebook.com\/codingislove\/","article_author":"https:\/\/www.facebook.com\/ranjithkumar10","article_published_time":"2016-02-24T06:42:19+00:00","article_modified_time":"2018-03-28T12:16:19+00:00","og_image":[{"width":500,"height":226,"url":"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_yay.jpg","type":"image\/jpeg"}],"author":"Ranjith kumar","twitter_card":"summary_large_image","twitter_title":"AngularJS for complete beginners","twitter_description":"AngularJS! One of the most popular javascript frameworks available today. Angular is widely used, be it an Intermediate web developer or enterprises like IBM, Paypal, Google etc everyone is using it. Of course AngularJS is maintained and supported by Google. Due to...","twitter_image":"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_yay.jpg","twitter_creator":"@codingislove","twitter_site":"@codingislove","twitter_misc":{"Written by":"Ranjith kumar","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#article","isPartOf":{"@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/"},"author":{"name":"Ranjith kumar","@id":"https:\/\/codingislove.com\/#\/schema\/person\/ecb142505163b016d59bfbe662af587e"},"headline":"AngularJS for complete beginners","datePublished":"2016-02-24T06:42:19+00:00","dateModified":"2018-03-28T12:16:19+00:00","mainEntityOfPage":{"@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/"},"wordCount":3518,"commentCount":27,"publisher":{"@id":"https:\/\/codingislove.com\/#organization"},"image":{"@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg","keywords":["Angularjs","coding","Javascript"],"articleSection":["Coding Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/","url":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/","name":"AngularJS for complete beginners - Coding is Love","isPartOf":{"@id":"https:\/\/codingislove.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#primaryimage"},"image":{"@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg","datePublished":"2016-02-24T06:42:19+00:00","dateModified":"2018-03-28T12:16:19+00:00","description":"A simple and effective tutorial with simple words which can help\u00a0beginners\u00a0get started with the mighty AngularJS.","breadcrumb":{"@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codingislove.com\/angularjs-for-complete-beginners\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#primaryimage","url":"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg","contentUrl":"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg","width":400,"height":400,"caption":"angularjs_meme"},{"@type":"BreadcrumbList","@id":"https:\/\/codingislove.com\/angularjs-for-complete-beginners\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Coding is Love","item":"https:\/\/codingislove.com\/"},{"@type":"ListItem","position":2,"name":"Coding Tutorials","item":"https:\/\/codingislove.com\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"AngularJS for complete beginners"}]},{"@type":"WebSite","@id":"https:\/\/codingislove.com\/#website","url":"https:\/\/codingislove.com\/","name":"Coding is Love","description":"","publisher":{"@id":"https:\/\/codingislove.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codingislove.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codingislove.com\/#organization","name":"Coding is Love","url":"https:\/\/codingislove.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codingislove.com\/#\/schema\/logo\/image\/","url":"https:\/\/codingislove.com\/wp-content\/uploads\/2015\/12\/codinglovenew.png","contentUrl":"https:\/\/codingislove.com\/wp-content\/uploads\/2015\/12\/codinglovenew.png","width":300,"height":225,"caption":"Coding is Love"},"image":{"@id":"https:\/\/codingislove.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/codingislove\/","https:\/\/x.com\/codingislove"]},{"@type":"Person","@id":"https:\/\/codingislove.com\/#\/schema\/person\/ecb142505163b016d59bfbe662af587e","name":"Ranjith kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codingislove.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f5486247269539c638227e6213187139cc7460eeb16d789fa757485f1d2b87f0?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f5486247269539c638227e6213187139cc7460eeb16d789fa757485f1d2b87f0?s=96&d=wavatar&r=g","caption":"Ranjith kumar"},"description":"A CA- by education, self taught coder by passion, loves to explore new technologies and believes in learn by doing.","sameAs":["https:\/\/www.facebook.com\/ranjithkumar10","https:\/\/www.instagram.com\/livin_on_d_edge\/","https:\/\/www.linkedin.com\/in\/ranjithkumar10","https:\/\/www.youtube.com\/c\/codingislove01"],"url":"https:\/\/codingislove.com\/author\/ranjithkumar10\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/codingislove.com\/wp-content\/uploads\/2016\/02\/angularjs_meme.jpg","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/posts\/41","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/comments?post=41"}],"version-history":[{"count":0,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/posts\/41\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/media\/166"}],"wp:attachment":[{"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/media?parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/categories?post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/tags?post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}