{"id":1465,"date":"2014-11-03T15:15:59","date_gmt":"2014-11-03T13:15:59","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=1465"},"modified":"2018-06-20T17:13:20","modified_gmt":"2018-06-20T14:13:20","slug":"single-page-apps","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/","title":{"rendered":"Single Page Apps"},"content":{"rendered":"<p>Single Page Apps are becoming increasingly popular as the demand for highly responsive apps is increasing. We could be using Ajax and Javascript to do this, but we will be using Angular as it is a structural framework for dynamic web-apps, efficient and easy to use, as described by the people who built it.<\/p>\n<p>We\u2019re going to create a simple app with only a homepage, an about page and a date page, so as to not need to refresh the page to view changes, but have it reflect them immediately.<\/p>\n<p>[ulp id=&#8217;LXJcMJZXSsqGXYW8&#8242;]<\/p>\n<p><strong>We will use:<\/strong><\/p>\n<ul>\n<li>AngularJS<\/li>\n<li>Bower<\/li>\n<li>Twitter&#8217;s Bootstrap<\/li>\n<\/ul>\n<h2>Getting started<\/h2>\n<p>To go on with the project you might want to download <a href=\"http:\/\/getbootstrap.com\/\" target=\"_blank\" rel=\"noopener\">Bootstrap<\/a> and also Bower (<a href=\"http:\/\/bower.io\">here<\/a> you will find every information you need on how to do that).<\/p>\n<p>Firstly, we create a folder named <code>SinglePageApp<\/code> (you can name it anything you wish), an HTML file named <code>index.html<\/code> and a Javascript file named <code>app.js<\/code> inside of it, and we&#8217;re good to go.<\/p>\n<h2>Setting up AngularJS<\/h2>\n<p>First we ask Bower to install the Angular package by executing this in the terminal (make sure you\u2019re in your project\u2019s directory):<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">bower install angular<\/pre>\n<p>Then, again using Bower we install the Angular-Route package by executing:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">bower install angular-route<\/pre>\n<p>After executing these commands we will notice that in our project\u2019s directory a <code>bower_components<\/code> directory is added, inside of which are two folders, one named <code>angular<\/code> and one named <code>angular-route<\/code>. We will use them later. Then we open the <code>app.js<\/code> and write the JavaScript code for creating the Angular module, while adding <code>ngRoute<\/code> dependency to it. It should look like this:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">var app=angular.module('app',&#x5B;'ngRoute']);<\/pre>\n<p>Now is time to define routes by using the <code>config()<\/code> function, provided by angular.module. Right under the code for the angular module, in the <code>app.js<\/code> file we place this code:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">app.config(function($routeProvider){\r\n\t$routeProvider\r\n\t\r\n\t\t\/\/default page\r\n\t\t.when('\/',{\r\n\t\t\ttemplateUrl : 'pages\/homepage.html',\r\n\t\t\tcontroller  : 'Homepage'\r\n\t\t})\r\n\t\t\r\n\t\t\/\/about page\r\n\t\t.when('\/about',{\r\n\t\t\ttemplateUrl : 'pages\/about.html',\r\n\t\t\tcontroller  : 'About'\r\n\t\t})\r\n\t\t\r\n\t\t\/\/date page\r\n\t\t.when('\/date',{\r\n\t\t\ttemplateUrl : 'pages\/date.html',\r\n\t\t\tcontroller  : 'Date'\r\n\t\t});\r\n});\r\n<\/pre>\n<p>We have injected <code>$routeProvider<\/code> as a parameter to the function. Now the <code>when()<\/code> function of the <code>$routeProvider<\/code> can be used to configure the routes. This function takes two parameters: the route name and the route definition object which in itself contains various details for a route. We will use only two of those properties: the <code>templateURL<\/code> which is a relative location of the view file, starting from <code>index.html<\/code>; and the controller associated with the view.<\/p>\n<p>We have reached the point where we should create the controllers for the different views. First we create a directory named <code>controllers<\/code> in the <code>js<\/code> folder, and inside of it we create a JavaScript file named <code>controllers.js<\/code> where we will put this code snippet:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">app.controller('Homepage',&#x5B;'$scope',function($scope){\r\n\t$scope.homepage = &quot;Homepage&quot;;\r\n}]);\r\n\t\r\napp.controller('About',&#x5B;'$scope', function($scope){\r\n\t$scope.about = &quot;Lorem ipsum...&quot;;\r\n}]);\r\n\t\r\napp.controller('Date',&#x5B;'$scope', function($scope) {\r\n\t$scope.now = new Date();\r\n}]);\r\n<\/pre>\n<p>Don\u2019t forget to script the file <code>controllers.js<\/code> in the <code>index.html<\/code> file. You can even place the above code in the <code>app.js<\/code> file but it is not recommended as it could reduce the readability of the code and in heavier applications could complicate stuff.<\/p>\n<h2>The HTML markup of our app<\/h2>\n<p>An important thing to do if we want our app to function properly is to link and script all the files we&#8217;ve downloaded. First we link Bootstrap\u2019s CSS file by adding this right under the <code>&lt;\/title&gt;<\/code> tag:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;link rel=&quot;stylesheet&quot; href=&quot;css\/bootstrap.min.css&quot;&gt;\r\n<\/pre>\n<p>Now let\u2019s script Bootstrap\u2019s, Angular\u2019s and Angular-Route\u2019s JavaScript files by adding this code after the <code>&lt;link&gt;<\/code> tag:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;script src=&quot;js\/bootstrap.min.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script src=&quot;bower_components\/angular\/angular.min.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script src=&quot;bower_components\/angular-route\/angular-route.min.js&quot;&gt;&lt;\/script&gt;\r\n<\/pre>\n<p>Also we script the <code>app.js<\/code> file, as it contains our angular module and also other necessary things, like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;script src=&quot;js\/app.js&quot;&gt;&lt;\/script&gt;\r\n<\/pre>\n<p>You might want to place all this in the <code>&lt;body&gt;<\/code>\u00a0section, right before the <code>&lt;\/body&gt;<\/code>\u00a0tag, for performance reasons, as the browser will render the HTML markup first and then the JavaScript code is loaded. Please bear in mind that the scripting of <code>angular-route<\/code> and <code>app.js<\/code> should come after the scripting of <code>angular<\/code>, and <code>controller.js<\/code> should come after the scripting of <code>app.js<\/code>.<\/p>\n<p>Now let\u2019s create a directory named <code>pages<\/code> inside of which we will place the HTML files for the views. Beware that the files for the views should not be complete HTML files, they should only have the markup for the specific view.<\/p>\n<p>In the <code>homepage.html<\/code> file we will only place the <code>{{homepage}}<\/code> expression.<\/p>\n<p>The About page will be a typical descriptive page, so we will only need this code:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">{{ about }}\r\n<\/pre>\n<p>The date page will show us the date of today. The code will go like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">{{ now | date:'medium' }}\r\n<\/pre>\n<p>While by now you know that what we have placed inside the double curly brackets is an expression, it is worth noting that<br \/>\n<code>| date:'medium'<\/code> is a filter, a short way to format some of the most used expressions, such as dates, numbers, currency etc. Angular gives us several built-in filters as well as an easy way to create our own. This particular filter formats the date so as to show the month, date and then the year, and also the time in hours, minutes and seconds in AM\/PM format.<\/p>\n<p>Time to have a look at <code>index.html<\/code>. We will have to tell Angular in which part of the application it should be active. You saw that when declaring the angular module we named it <code>app<\/code>. To tell it where it should be active we add the attribute <code>ng-app=\"app\"<\/code> in the tag and everything inside of it turns into an AngularJS application. In our case, as the whole page will be an <code>ng-app<\/code> it is better to place the attribute in the <code>&lt;html&gt;<\/code> tag or in the <code>&lt;body&gt;<\/code> tag. I\u2019m choosing the second.<\/p>\n<p>In the <code>&lt;body&gt;<\/code>\u00a0section we will add the buttons, one for each view. We will use Bootstrap to create them easily but also to make them look stylish. The code will go like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;a href=&quot;#\/&quot;&gt;&lt;button class=&quot;btn btn-danger&quot;&gt;Homepage&lt;\/button&gt;&lt;\/a&gt;\r\n&lt;a href=&quot;#\/about&quot;&gt;&lt;button class=&quot;btn btn-success&quot;&gt;About&lt;\/button&gt;&lt;\/a&gt;\r\n&lt;a href=&quot;#\/date&quot;&gt;&lt;button class=&quot;btn btn-warning&quot;&gt;Date&lt;\/button&gt;&lt;\/a&gt;\u00a0\r\n<\/pre>\n<p>Take a look at the <code>href<\/code> attribute in each of the links. Familiar? It is the route we specified when we used <code>when()<\/code> function, only it has a # (hashbang) before it. The class attribute you see in the <code>&lt;button&gt;<\/code> tags is a class provided by Bootstrap, which makes them look fancy and have specific colors (red for <code>btn-danger<\/code>, green for <code>btn-success<\/code> and orange for <code>btn-warning<\/code>).<\/p>\n<p>But where is the app going to display the views we created? We will tell it where, by placing a <code>&lt;div&gt;<\/code>\u00a0element containing the attribute <code>ng-view<\/code>. It will look like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;div class=&quot;row&quot;&gt;\r\n &lt;div ng-view&gt;\r\n   &lt;!-- Views go here --&gt;\r\n &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>I have placed it inside another <code>&lt;div&gt;<\/code>\u00a0element, but you can place it anywhere in the application&#8217;s body. AngularRoute gives it the opportunity to completely replace the <code>&lt;div ng-app&gt;<\/code> element with the element <code>&lt;ng-app&gt; &lt;\/ng-app&gt;<\/code>, but is not recommended if your target users will use IE as it does not support the element version.<\/p>\n<p>You may have noticed the &#8220;row&#8221; attribute I gave to the <code>div<\/code> containing the <code>ng-view<\/code> element. It is there for styling purposes only. To make the website look a little more fancy, you create a <code>styling.css<\/code> file inside the <code>css<\/code> folder (don\u2019t forget to link it), and place this code inside it:<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">.row{\r\n\ttext-align: center;\r\n\tbackground-color: steelblue;\r\n\tfont-family: &quot;Georgia&quot;, serif , sans-serif;\r\n\tfont-size: 30px;\r\n}\r\n<\/pre>\n<p>You can now open your Single-Page App and it will show you different views each time you click the buttons, without reloading the page, looking like this:<\/p>\n<figure id=\"attachment_1511\" aria-describedby=\"caption-attachment-1511\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/Untitled.jpg\"><img decoding=\"async\" class=\"size-full wp-image-1511\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/Untitled.jpg\" alt=\"Single Page App when the About button is pressed.\" width=\"800\" height=\"400\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/Untitled.jpg 800w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/Untitled-300x150.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-1511\" class=\"wp-caption-text\">Single Page App when the About button is pressed.<\/figcaption><\/figure>\n<p>Such is the magic of AngularJS.<\/p>\n<h2>Download the source code for Single Page App<\/h2>\n<p>This was an example of Single Page Apps in AngularJS.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the source code for this example here: <strong><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/SinglePageApp.zip\">SinglePageApp<\/a> <\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Single Page Apps are becoming increasingly popular as the demand for highly responsive apps is increasing. We could be using Ajax and Javascript to do this, but we will be using Angular as it is a structural framework for dynamic web-apps, efficient and easy to use, as described by the people who built it. We\u2019re &hellip;<\/p>\n","protected":false},"author":25,"featured_media":909,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[49],"class_list":["post-1465","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-angular-js","tag-bower"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Single Page Apps - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn more about single page apps? Check out our article where we will be using Angular as it is a structural framework for dynamic web-apps!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Single Page Apps - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn more about single page apps? Check out our article where we will be using Angular as it is a structural framework for dynamic web-apps!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/era.balliu.7\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-03T13:15:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-20T14:13:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Era Balliu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BalliuEra\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Era Balliu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/\"},\"author\":{\"name\":\"Era Balliu\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e\"},\"headline\":\"Single Page Apps\",\"datePublished\":\"2014-11-03T13:15:59+00:00\",\"dateModified\":\"2018-06-20T14:13:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/\"},\"wordCount\":1417,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"keywords\":[\"Bower\"],\"articleSection\":[\"Angular.js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/\",\"name\":\"Single Page Apps - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"datePublished\":\"2014-11-03T13:15:59+00:00\",\"dateModified\":\"2018-06-20T14:13:20+00:00\",\"description\":\"Interested to learn more about single page apps? Check out our article where we will be using Angular as it is a structural framework for dynamic web-apps!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Angular.js\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/angular-js\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Single Page Apps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e\",\"name\":\"Era Balliu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g\",\"caption\":\"Era Balliu\"},\"description\":\"Era is a Telecommunications Engineering student, with a great passion for new technologies. Up until now she has been coding with HTML\/CSS, Bootstrap and other front-end coding languages and frameworks, and her recent love is Angular JS.\",\"sameAs\":[\"http:\/\/www.webcodegeeks.com\/\",\"https:\/\/www.facebook.com\/era.balliu.7\",\"https:\/\/www.instagram.com\/eraballiu\/\",\"https:\/\/www.linkedin.com\/in\/eraballiu\",\"https:\/\/www.pinterest.com\/001r2gw0jt0ln6d\/\",\"https:\/\/x.com\/BalliuEra\",\"https:\/\/www.youtube.com\/c\/eraballiu\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/era-balliu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Single Page Apps - Web Code Geeks - 2026","description":"Interested to learn more about single page apps? Check out our article where we will be using Angular as it is a structural framework for dynamic web-apps!","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:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/","og_locale":"en_US","og_type":"article","og_title":"Single Page Apps - Web Code Geeks - 2026","og_description":"Interested to learn more about single page apps? Check out our article where we will be using Angular as it is a structural framework for dynamic web-apps!","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/era.balliu.7","article_published_time":"2014-11-03T13:15:59+00:00","article_modified_time":"2018-06-20T14:13:20+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","type":"image\/jpeg"}],"author":"Era Balliu","twitter_card":"summary_large_image","twitter_creator":"@BalliuEra","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Era Balliu","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/"},"author":{"name":"Era Balliu","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e"},"headline":"Single Page Apps","datePublished":"2014-11-03T13:15:59+00:00","dateModified":"2018-06-20T14:13:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/"},"wordCount":1417,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","keywords":["Bower"],"articleSection":["Angular.js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/","name":"Single Page Apps - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","datePublished":"2014-11-03T13:15:59+00:00","dateModified":"2018-06-20T14:13:20+00:00","description":"Interested to learn more about single page apps? Check out our article where we will be using Angular as it is a structural framework for dynamic web-apps!","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/single-page-apps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"Angular.js","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/angular-js\/"},{"@type":"ListItem","position":4,"name":"Single Page Apps"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e","name":"Era Balliu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g","caption":"Era Balliu"},"description":"Era is a Telecommunications Engineering student, with a great passion for new technologies. Up until now she has been coding with HTML\/CSS, Bootstrap and other front-end coding languages and frameworks, and her recent love is Angular JS.","sameAs":["http:\/\/www.webcodegeeks.com\/","https:\/\/www.facebook.com\/era.balliu.7","https:\/\/www.instagram.com\/eraballiu\/","https:\/\/www.linkedin.com\/in\/eraballiu","https:\/\/www.pinterest.com\/001r2gw0jt0ln6d\/","https:\/\/x.com\/BalliuEra","https:\/\/www.youtube.com\/c\/eraballiu"],"url":"https:\/\/www.webcodegeeks.com\/author\/era-balliu\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1465"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1465\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/909"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}