{"id":12498,"date":"2016-05-24T16:15:58","date_gmt":"2016-05-24T13:15:58","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=12498"},"modified":"2017-12-19T16:27:37","modified_gmt":"2017-12-19T14:27:37","slug":"angular-js-single-page-application-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/","title":{"rendered":"Angular.js Single Page Application Example"},"content":{"rendered":"<p>Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it&#8217;s incomparable in providing us with the means to create dynamic and efficient web-apps.<\/p>\n<p>There are a number of useful features that have made Angular not only famous for, but also irreplaceable in web-developing. One of these features is routing, or more accurately <code>ng-route<\/code>, which is best represented by it&#8217;s most characteristic form of usage: Single Page Apps!<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n[ulp id=&#8217;LXJcMJZXSsqGXYW8&#8242;]<\/p>\n<div class=\"toc\">\n<h3>Table Of Contents<\/h3>\n<dl>\n<dt><a href=\"#whatarespa\">1. What are Single Page apps?<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#thegood\">1.1 The good<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#thebad\">1.2 The Bad<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#headstart\">2. A Head Start on our SPA<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#whatuse\">2.1 What we&#8217;ll use<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#gettingready\">2.2 Getting everything ready<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#htmlpart\">3. The HTML Part<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#linkscript\">3.1. Linking and Scripting external parts<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#commonpart\">3.2 The common part<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#javascriptpart\">4. The Javascript part<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#mainmodule\">4.1 Creating the main module<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#configroute\">4.2 Configuring the routes<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#controllers\">4.3 Creating the controllers<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#pagehtml\">5. The HTML for the pages<\/a><\/dt>\n<dt><a href=\"#wrappingup\">6. Wrapping up<\/a><\/dt>\n<dt><a href=\"#seo\">7. Making your App SEO friendly<\/a><\/dt>\n<dt><a href=\"#download\">8. Download the source code<\/a><\/dt>\n<\/dl>\n<\/div>\n<h2><a name=\"whatarespa\"><\/a>1. What are Single Page Apps?<\/h2>\n<h3><a name=\"thegood\"><\/a>1.1 The Good<\/h3>\n<p>If you are even remotely familiar with Angular.js&#8217; benefits, then you have had the chance to already hear about &#8220;Single Page Applications&#8221; or SPAs. Single Page Apps are websites that are built with the concept of phone\/tablet apps in mind. That means that you only have to load the website once and when going from one page to another you&#8217;ll have the view automatically loaded ahead of time, so that you don&#8217;t have to wait for them loading each time you click something.<\/p>\n<p>Of course it has a number of benefits, one of the most obvious ones being having a very sleek, not-annoying appearance. In fact, not only \u00a0it is simply not annoying, but your app will be fast and responsive, giving the user the feel of a native app. Which immediately translates to improved user experience, and a considerable one at that.<\/p>\n<p>To get you different views in each page loaded without having to reload or refresh the app is one of the ways this goal is reached. Angular pre-loads and caches all your pages, so that is not needed. That also gives your app the ability to work offline too, as the views are already loaded and cached, and ready for use.<\/p>\n<p>Another benefit for the programmer is the fact that you will not have to repeat and copy paste code from one view to the other to give your app a coherent feel. You will only have to write that code once, and just go on coding the part that will be different. No more repeating anything, and while practice makes perfect, it can become so burdensome at times that you might feel tempted to give it up for good. With SPAs this temptation is definitely gone.<\/p>\n<p>Is Angular the only one able to provide us with these perks? No, you can also use vanilla Javascript and AJAX calls, but Angular does make it simpler and easier to understand, while being more efficient at that.<\/p>\n<h3><a name=\"thebad\"><\/a>1.2 The Bad<\/h3>\n<p>So what is the catch? Well, nothing is perfectly perfect, Angular SPAs have their own pitfalls too. One of the most obvious ones is that while you don&#8217;t have to reload each page whenever you click something, the initial load of your app will take longer. That&#8217;s because you are loading everything at once and every resource your app will need should be downloaded right away.<\/p>\n<p>Another thing that you may or may not encounter depending on the level of expertise you have on Angular is the fact that while your code will be shorter, it will also be more complex. There&#8217;s a saying in my country which basically translates to &#8220;it&#8217;s harder to write short and explain all I mean&#8221;, and it&#8217;s very fitting in this case. You will have to write less code, but you&#8217;ll have to think well every line of it.<\/p>\n<p>Another negative aspect of SPAs is the fact that to make your app SEO friendly, you will have to use special techniques and perform regular maintenance on them, as Javascript apps are not automatically SEO friendly. That happens because the content is built dynamically and it&#8217;s very difficult for these things named crawlers to index your page content. While we will not go too deep into explaining them, Google has already provided us with a <a href=\"https:\/\/developers.google.com\/webmasters\/ajax-crawling\/docs\/learn-more\" target=\"_blank\">guide<\/a> which can be used to make these kind of apps crawlable.<\/p>\n<p>Finally, your user will have to have Javascript enabled in their browser in order for your Single Page Application to work properly. However, almost everyone has it nowadays, so I&#8217;d say it is not that big of a deal.<\/p>\n<h2><a name=\"headstart\"><\/a>2. A Head start on our SPA<\/h2>\n<p>The Single Page App that we will build in this example will be a very simple one that will only have three pages so that our point can be illustrated but we won&#8217;t add any fancy stuff there. That is an opportunity for you to use the knowledge and build bigger and more complex apps similar to this one in the future, combining Angular.js with a number of other technologies, be it front or back-end.<\/p>\n<h3><a name=\"whatuse\"><\/a>2.1 What we&#8217;ll use<\/h3>\n<p>We will use a number of other technologies except AngularJS to make our project more complete and to give a head start to those of you who are still in the beginning of your journey as a developer. Those would be:<\/p>\n<ol>\n<li><a href=\"https:\/\/www.npmjs.com\/\" target=\"_blank\">npm<\/a> as a packet manager for Javascript. It will help us find the necessary packages for our project. Of course, in this one, it&#8217;s use will be minimal, so if you&#8217;re here only for the Angular part, you don&#8217;t have to worry at all. However, if you&#8217;re working on a team it can facilitate your work in a lot of ways.<\/li>\n<li><a href=\"http:\/\/bower.io\/\" target=\"_blank\">Bower<\/a> will be our manager of every framework, library, asset and utility, helping us keep track of them and making sure they&#8217;re up to date. Bower is more focused on front-end technologies, while <code>npm<\/code> is usually used for backend and everything else.<\/li>\n<li><a href=\"http:\/\/getbootstrap.com\/\" target=\"_blank\">Twitter&#8217;s Bootstrap<\/a> will be the visuals of the website. It&#8217;s a framework that will take care of all the styling part of the app, from grids, to button, to colors, to everything CSS as it&#8217;s a framework of exactly that.<\/li>\n<li>As an alternative to Bootstrap you might want to use <a href=\"http:\/\/materializecss.com\/getting-started.html\" target=\"_blank\">MaterializeCSS<\/a> which some people might find easier to use and in very small projects like ours, it might be more fitting. However, we&#8217;ll stick to Bootstrap with this one, as it&#8217;s usually a more popular choice and this way this tutorial will help more people.<\/li>\n<\/ol>\n<p>Let&#8217;s see how to get everything ready!<\/p>\n<h3><a name=\"gettingready\"><\/a>2.2 Getting everything ready!<\/h3>\n<p>First of all we have to create a directory where we&#8217;ll keep everything, in our case I named it <code>SinglePageApps<\/code> but the choice is yours. Next up we create a basic HTML file named <code>index.html<\/code> and a Javascript file named <code>app.js<\/code>. Then we get the packages we mentioned above and start installing them one by one.<\/p>\n<h4>2.2.1 Installing npm<\/h4>\n<p>First we install <code>npm<\/code>, and it&#8217;s very easy to do so. You just have to go and download Node.js <a href=\"https:\/\/nodejs.org\/en\/download\/\" target=\"_blank\">here<\/a> and that is it, <code>npm<\/code> comes with it as a whole package. You can try and see if it really is installed by opening the terminal in your directory and running <code>npm -v<\/code> which will give you the version of <code>npm<\/code> if you have it or a notice if you don&#8217;t.<\/p>\n<h4>2.2.2 Installing Bower<\/h4>\n<p>After doing that we will install Bower, and we&#8217;ll use <code>npm<\/code> to do it. You have to run the command below in the terminal:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>terminal<\/em><\/span><\/p>\n<pre class=\"brush:bash\">npm install bower\r\n<\/pre>\n<p>After this command takes effect you will see the folder <code>node_modules<\/code> added to your directory. After installing Bower, you have to run the command below to set up your <code>bower.json<\/code> file:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>terminal<\/em><\/span><\/p>\n<pre class=\"brush:bash\">bower init\r\n<\/pre>\n<p>You will be asked to enter a bit of data related to the project and then the manifesto file is ready, which means you can now use Bower to your liking.<\/p>\n<h4>2.2.3 Installing Angular, Angular-Route and Bootstrap<\/h4>\n<p>You can use Bower to install Angular, Angular-Route and Bootstrap specifically. You only have to run one line for each of them, namely these:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>terminal<\/em><\/span><\/p>\n<pre class=\"brush:bash\">bower install angular\r\nbower install angular-route\r\nbower install bootstrap\r\n<\/pre>\n<p>You&#8217;ll find everything stored in the new <code>bower_components<\/code> folder, together with jQuery, since it&#8217;s needed for Bootstrap to function properly. With this, all the needed installments are done, we just have to go on with the app.<\/p>\n<h2><a name=\"htmlpart\"><\/a>3. The HTML part<\/h2>\n<p>As usually, we&#8217;ll divide our app into an HTML part and a Javascript part (which will in fact be all Angular). Let&#8217;s start with the HTML part, to give a structure to our app and start changing things to reach into a full all step by step. First, we&#8217;ll only have the basic setup of the HTML file, no links no scripts. It&#8217;ll look like below:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n    &lt;meta charset=\"UTF-8\"&gt;\r\n    &lt;title&gt;Single Page App for WebCodeGeeks&lt;\/title&gt;\r\n\r\n\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>But where are all the other parts we mentioned above? Let&#8217;s add them!<\/p>\n<h3><a name=\"linkscript\"><\/a>3.1 Linking and Scripting external parts<\/h3>\n<p>First of all we have to add Angular and Angular-Route as that&#8217;s the whole point of the functionality of our app. You can do that by adding the code snippet below in the <code>&lt;head&gt;<\/code> section of our <code>index.html<\/code> file:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;script src=\"bower_components\/angular\/angular.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"bower_components\/angular-route\/angular-route.min.js\"&gt;&lt;\/script&gt;\r\n<\/pre>\n<p>After doing that we link and script the Bootstrap components doing the same with the code below as we did with the one above:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;link rel=\"stylesheet\" href=\"bower_components\/bootstrap\/dist\/css\/bootstrap.min.css\"\/&gt;\r\n&lt;script src=\"bower_components\/bootstrap\/dist\/js\/bootstrap.min.js\"&gt;&lt;\/script&gt;\r\n<\/pre>\n<p>There are also a number of other external parts that we will have to link and script into our page but we will mention them when we use them to avoid confusion.<\/p>\n<h3><a name=\"commonpart\"><\/a>3.2 The common part<\/h3>\n<p>As we said, there is a part that will be common for every page of the app. That is what we will be building now. But first we have to add the attribute <code>ng-app=\"app\"<\/code> into our <code>&lt;body&gt;<\/code> tag to show the browser where the Angular app will be placed. You can place it anywhere, which means that you can make your whole website an Angular app or just a part of it, depending on your user&#8217;s needs and what you want to show them.<\/p>\n<p>Then we create the buttons which will be used as triggers to go from one page to the other. The code would go like below:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;a href=\"#\/\"&gt;&lt;button class=\"btn btn-primary\"&gt;Homepage&lt;\/button&gt;&lt;\/a&gt;\r\n&lt;a href=\"#\/about\"&gt;&lt;button class=\"btn btn-info\"&gt;About&lt;\/button&gt;&lt;\/a&gt;\r\n&lt;a href=\"#\/date\"&gt;&lt;button class=\"btn\"&gt;Date&lt;\/button&gt;&lt;\/a&gt;\r\n<\/pre>\n<p>What we&#8217;ll have by now is this:<\/p>\n<figure id=\"attachment_12688\" aria-describedby=\"caption-attachment-12688\" style=\"width: 846px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/?attachment_id=12688\" rel=\"attachment wp-att-12688\"><img decoding=\"async\" class=\"size-full wp-image-12688\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/05\/Capture.jpg\" alt=\"Common part of the SPA\" width=\"846\" height=\"320\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/05\/Capture.jpg 846w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/05\/Capture-300x113.jpg 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/05\/Capture-768x290.jpg 768w\" sizes=\"(max-width: 846px) 100vw, 846px\" \/><\/a><figcaption id=\"caption-attachment-12688\" class=\"wp-caption-text\">Common part of the SPA<\/figcaption><\/figure>\n<p>How did the colors and the styling come into play? And also, if you notice the URL even the link changes if you click one of them (despite the fact that nothing else changes when you click, but we&#8217;ll get to that in a minute). That is a result of the class attribute that we added to each button. Bootstrap allows us to change the style of the buttons by changing that attribute. Except for the ones we used there are also <code>btn-success<\/code>, <code>btn-warning<\/code> and <code>btn-danger<\/code> which would make the buttons go green, yellow and red respectively.<\/p>\n<p>The URL is changed using the <code>href<\/code> attribute. Note that we use the # to navigate to the pages, so that our browser doesn&#8217;t get confused and think that we&#8217;re really changing the website we&#8217;re visiting. It&#8217;s important because then we wouldn&#8217;t have an SPA at hand at all but just a regular website.<\/p>\n<p>The next part is showing the browser where is the part of the app that will change. To do that you just have to add the code below whenever you want them to appear:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;div class=\"row\"&gt;\r\n    &lt;div ng-view&gt;\r\n        &lt;!-- View goes here --&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>That&#8217;s basically all that you have to put in the main file in order for you to have a SPA: the trigger for the multiple pages and the <code>ng-view<\/code> directive which makes it possible for what you see on that part to be different each time you click a different button.<\/p>\n<h2><a name=\"javascriptpart\"><\/a>4. The Javascript part<\/h2>\n<p>We&#8217;ll call this part the Javascript part because basically Angular is a Javascript framework, but you can call it Angular if you want things to be more strict, it won&#8217;t change a thing for the app.<\/p>\n<h3><a name=\"mainmodule\"><\/a>4.1 Creating the main module<\/h3>\n<p>First of all, in order for you to have an Angular app, you will first have to create the Angular module. You remember that we placed the attribute <code>ng-app=\"app\"<\/code> inside our <code>&lt;body&gt;<\/code> tag. <code>app<\/code> will be the name of our module, which you&#8217;ll see included in the code snippet below:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>app.js<\/em><\/span><\/p>\n<pre class=\"brush:js\">var app=angular.module('app',['ngRoute']);\r\n<\/pre>\n<p>As you see, besides the name of the module we have added <code>ngRoute<\/code> as an injected dependency, which is necessary for the routing process which we&#8217;ll discus below in detail.<\/p>\n<h3><a name=\"configroute\"><\/a>4.2 Configuring the routes<\/h3>\n<p><code>angular.module()<\/code> provides us with another function named <code>config()<\/code> which will help us set up our routes.<\/p>\n<p>But let&#8217;s create a folder named <code>pages<\/code> first, which will contain all three of the pages we&#8217;ll create. For the moment leave it at that, and we&#8217;ll get back to the pages later.<\/p>\n<p>To configure the routes you have to use the <code>config()<\/code> function like below:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>app.js<\/em><\/span><\/p>\n<pre class=\"brush:js\">app.config(function($routeProvider){\r\n    $routeProvider\r\n\r\n        \/\/default page\r\n        .when('\/',{\r\n           templateUrl : 'pages\/homepage.html',\r\n           controller  : 'Homepage'\r\n        })\r\n\r\n        \/\/about page\r\n        .when('\/about',{\r\n            templateUrl : 'pages\/about.html',\r\n            controller  : 'About'\r\n        })\r\n\r\n        \/\/date page\r\n        .when('\/date',{\r\n           templateUrl : 'pages\/date.html'\r\n           controller  : 'Date'\r\n        });\r\n});\r\n<\/pre>\n<p>You see that we have used <code>$routeProvider<\/code> right away when using the <code>config()<\/code> function. It is just a provider for the ngRoute module. We have injected $routeProvider as a parameter to the function whose <code>when()<\/code> function can be used to configure the routes. <code>$routeProvider<\/code> is also used in case we want the route paths to be case sensitive, as it provides us with a property named <code>caseInsensitiveMatch<\/code> to do just that. By default the route paths are case insensitive, which would mean that this property is by default set to false, and to make the path case sensitive you&#8217;d have to change it&#8217;s value to TRUE. However, it&#8217;s not really advised, as it can make browsing directly to the link by writing it in the URL bar of the browser more difficult.<\/p>\n<p>The <code>when()<\/code> function will take two parameters: the route name and the route definition. The route definition is an object which contains multiple details for a route, such as <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. With that the routes are configured, but what about the controllers? We didn&#8217;t see them anywhere!<\/p>\n<h3><a name=\"controllers\"><\/a>4.3 Creating the controllers<\/h3>\n<p>Controllers are basically what makes the pages appear in the <code>ng-view<\/code> and be functional, else they wouldn&#8217;t be visible even though we did create them. We will create a separate file for them, to keep the code clean and organized. Let&#8217;s name it <code>controllers.js<\/code>.The code for each of them would go like below:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>controllers.js<\/em><\/span><\/p>\n<pre class=\"brush:js\">app.controller('Homepage',['$scope',function($scope){\r\n    $scope.homepage = \"Homepage\";\r\n}]);\r\n     \r\napp.controller('About',['$scope', function($scope){\r\n    $scope.about = \"Lorem ipsum...\";\r\n}]);\r\n     \r\napp.controller('Date',['$scope', function($scope) {\r\n    $scope.now = new Date();\r\n}]);\r\n<\/pre>\n<p>We use the function <code>app.controller()<\/code> to create each controller. Notice that the first part, <code>app<\/code>, is also the name of the angular module, as we defined it in the previous section when we created the module, and also the attribute on the &lt;body&gt; tag. If you don&#8217;t want it to be similar to the name of the attribute which is <code>ng-app<\/code> you can call it something else, it doesn&#8217;t matter. What matters is that it&#8217;s used properly in every part of the code.<\/p>\n<p>This function takes two parameters: the name of the controller, and it&#8217;s function, or what you want the controller to do. Both are obligatory, and you have to pay very close attention to the second parameter because it&#8217;s what your controller will do. It&#8217;s customized, so you can do whatever you wish.<\/p>\n<p>As you see, each page will just show a small phrase, except for the third one, which will show us the date. With this, we&#8217;re done with the Javascript part.<\/p>\n<h2><a name=\"pagehtml\"><\/a>5. The HTML for the pages<\/h2>\n<p>All that&#8217;s left to be done now, is to only write the markup of each of the pages of our SPA. We already created a folder that will contain the HTML files for each page, so now we create these HTML files. In our case, I&#8217;ve named them <code>homepage.html<\/code>, <code>about.html<\/code> and <code>date.html<\/code>.<\/p>\n<p>Below you&#8217;ll ave everything that goes into the <code>homepage.html<\/code> file:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>homepage.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">{{homepage}}\r\n<\/pre>\n<p>Yes, it&#8217;s just that expression! No, not even the basic HTML structure is needed, that is already set by the common part of the HTML! The next two files will contain the code snippet below:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>about.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">{{about}}\r\n<\/pre>\n<p>For this one too we&#8217;ve used an AngularJS expression, which are generally written inside double braces and are Angular&#8217;s way of binding data to the HTML structure. Of course, you wont see <code>{{about}}<\/code> displayed in your page but the information that this expression carries. That is specified when building the controllers. The expressions can even contain variables and operators, but in our case, we&#8217;ve kept it simple.<\/p>\n<p>However, keep in mind that if you place the expression outside the jurisdiction of ng-app, it will be displayed just as it is written and will not be resolved by Angular.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>date.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">{{now |date:'medium'}}\r\n<\/pre>\n<p>In the last one we&#8217;ve also used a filter to stylize the date format a bit, but yeah, it&#8217;s just that. There are a number of predefined filters for numbers in general and date in particular. The one we&#8217;re using here is <code>medium<\/code>, which would display the date in the <code>MMM d, y h:mm:ss a<\/code> format, making it look something like this: Jan 11, 2016 9:05:08 AM.<\/p>\n<h2><a name=\"wrappingup\"><\/a>6. Wrapping up<\/h2>\n<p>To wrap it all up, you shouldn&#8217;t forget to link and script all the custom files we created into the main one. Those would be: the <code>app.js<\/code> file and the controllers file. If you want to add any files for styling etc. you have to add them all for your SPA to work properly. Just add the part below:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">  &lt;!-- Custom files --&gt;\r\n    &lt;script src=\"app.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"controllers.js\"&gt;&lt;\/script&gt;\r\n<\/pre>\n<p>With that, you&#8217;re good to go! When you click the Homepage button, you&#8217;ll look at this view:<\/p>\n<figure id=\"attachment_12693\" aria-describedby=\"caption-attachment-12693\" style=\"width: 843px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/attachment\/second-3\/\" rel=\"attachment wp-att-12693\"><img decoding=\"async\" class=\"size-full wp-image-12693\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/05\/second.jpg\" alt=\"The view when clicking the Homepage button.\" width=\"843\" height=\"265\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/05\/second.jpg 843w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/05\/second-300x94.jpg 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/05\/second-768x241.jpg 768w\" sizes=\"(max-width: 843px) 100vw, 843px\" \/><\/a><figcaption id=\"caption-attachment-12693\" class=\"wp-caption-text\">The view when clicking the Homepage button.<\/figcaption><\/figure>\n<p>It looks very simple and unflattering when you compare it to other websites on the internet, but keep in mind that this is only the beginning. Step by step you can make your website one of the very best you could find!<\/p>\n<h2><a name=\"seo\"><\/a>7. Making your App SEO friendly<\/h2>\n<p>You might have heard of SEO a lot lately since it&#8217;s no more just an added bonus for websites but it&#8217;s starting to become a requirement as website owners vie for the attention and views of an always bigger and expanding audience. It is, of course, understandable, as everything is starting to be measured by number of clicks, and even getting paid for them, so why not make your app SEO friendly too, while you&#8217;re at it?<\/p>\n<p>SEO is an acronym for search engine optimization, which is a number of techniques and methods used to make a website appear as higher as possible in the list of the Search results of a search engine, because a higher ranking in the search results would definitely mean higher user traffic. But how you can do that depends on how the search engines index your website.<\/p>\n<p>Google has released a guide to this, which boils down to this: They use crawlers to index pages. These crawlers find URL that look legit and uncluttered (which means that you should give some thought to what you place in <code>templateURL<\/code> for each page) and ask the servers for the contents of the webpage corresponding to it. The webserver returns an HTML snapshot of the page which contains it&#8217;s content and is used to index your page based on it.<\/p>\n<p>Problem is, since our app is basically built with Javascript (as Angular is a Javascript framework in essence) that would mean that the content is built dynamically. So when the crawler asks for the content of the page it will be difficult because it might be still not generated by the browser.<\/p>\n<p>Thankfully there are senior developers out there that believe that SEO is not a privilege but a right, so they created services that make Javascript based webpages crawlable, and Angular in particular too. These solutions include:<\/p>\n<ul>\n<li>Set up a Prerender service with <a href=\"https:\/\/prerender.io\/\" target=\"_blank\">Prerender.io<\/a> which would take HTML snapshots of your website and then serve them to the crawlers when needed. It can also be used for BackboneJS and EmberJS except for Angular<\/li>\n<li>You can use similar services such as <a href=\"http:\/\/www.brombone.com\/\" target=\"_blank\">Brombone<\/a>, <a href=\"http:\/\/getseojs.com\/\" target=\"_blank\">SEO.js<\/a> or <a href=\"https:\/\/www.seo4ajax.com\/\" target=\"_blank\">SEO4Ajax<\/a>.<\/li>\n<li>Another solution would be to create a similar service of your own.<\/li>\n<\/ul>\n<p>Even for the biggest pitfalls in Angular can be found a solution, and that is one of the reasons why it is being so widely used in the programming world.<\/p>\n<h2><a name=\"download\"><\/a>8. Download the source code<\/h2>\n<p>This was an example of Single Page Apps with AngularJS.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here:<b>\u00a0<a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/05\/SinglePageApps.zip\">SinglePageApps<\/a><\/b><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it&#8217;s incomparable in providing us with the means to create dynamic and efficient web-apps. There are a number of useful features that have made Angular not only famous for, but also irreplaceable in &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":[],"class_list":["post-12498","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-angular-js"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Angular.js Single Page Application Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it&#039;s incomparable in\" \/>\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\/angular-js-single-page-application-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Angular.js Single Page Application Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it&#039;s incomparable in\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/\" \/>\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=\"2016-05-24T13:15:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-19T14:27:37+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=\"19 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\/angular-js-single-page-application-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/\"},\"author\":{\"name\":\"Era Balliu\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e\"},\"headline\":\"Angular.js Single Page Application Example\",\"datePublished\":\"2016-05-24T13:15:58+00:00\",\"dateModified\":\"2017-12-19T14:27:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/\"},\"wordCount\":3429,\"commentCount\":11,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"articleSection\":[\"Angular.js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/\",\"name\":\"Angular.js Single Page Application Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"datePublished\":\"2016-05-24T13:15:58+00:00\",\"dateModified\":\"2017-12-19T14:27:37+00:00\",\"description\":\"Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it's incomparable in\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#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\/angular-js-single-page-application-example\/#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\":\"Angular.js Single Page Application Example\"}]},{\"@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":"Angular.js Single Page Application Example - Web Code Geeks - 2026","description":"Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it's incomparable in","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\/angular-js-single-page-application-example\/","og_locale":"en_US","og_type":"article","og_title":"Angular.js Single Page Application Example - Web Code Geeks - 2026","og_description":"Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it's incomparable in","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/","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":"2016-05-24T13:15:58+00:00","article_modified_time":"2017-12-19T14:27:37+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":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/"},"author":{"name":"Era Balliu","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e"},"headline":"Angular.js Single Page Application Example","datePublished":"2016-05-24T13:15:58+00:00","dateModified":"2017-12-19T14:27:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/"},"wordCount":3429,"commentCount":11,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","articleSection":["Angular.js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/","name":"Angular.js Single Page Application Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","datePublished":"2016-05-24T13:15:58+00:00","dateModified":"2017-12-19T14:27:37+00:00","description":"Angular.js is one of the frameworks in the programming world that is acutely becoming one of the most widely-used of them, as it's incomparable in","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/angular-js-single-page-application-example\/#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\/angular-js-single-page-application-example\/#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":"Angular.js Single Page Application Example"}]},{"@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\/12498","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=12498"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/12498\/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=12498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=12498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=12498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}