{"id":9050,"date":"2012-10-12T13:05:21","date_gmt":"2012-10-12T07:35:21","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=9050"},"modified":"2017-08-03T14:04:40","modified_gmt":"2017-08-03T08:34:40","slug":"angularjs-implementing-routes-and-multiple-views","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/","title":{"rendered":"AngularJS: Implementing Routes And Multiple Views"},"content":{"rendered":"<p>We have already seen the concept of routes and multiple views in my <a title=\"Multiple Views, Layout Template and Routing\" href=\"https:\/\/tothenewco.pro\/blog\/angularjs-multiple-views-layout-template-and-routing\/\">previous blog<\/a>. Now let&#8217;s see how to implement it in code.<\/p>\n<p>To implement the concept of routing <a title=\"AngularJs App Development\" href=\"https:\/\/tothenewco.pro\/front-end-angularjs-development\">in AngularJS<\/a>, we need to create modules. Inside a module config, we can define routes.<\/p>\n<p>[javascript]<br \/>\nFile : js\/modules.js<br \/>\nangular.module(&#8216;videoModule&#8217;, []).<br \/>\n  config([&#8216;$routeProvider&#8217;, function($routeProvider) {<br \/>\n  $routeProvider.<br \/>\n\twhen(&#8216;\/videos&#8217;, {templateUrl: &#8216;videoList.html&#8217;,   controller: VideoController}).<br \/>\n\twhen(&#8216;\/videos\/:videoId&#8217;, {templateUrl: &#8216;videoDetail.html&#8217;, controller: VideoDetailController}).<br \/>\n      \totherwise({redirectTo: &#8216;\/videos&#8217;});<br \/>\n}]);<br \/>\n[\/javascript]<\/p>\n<p>Here &#8216;videoModule&#8217; is the name of the module. Inside the config API function, we inject the $routeProvider service, which is used to specify routes.<br \/>\nIn each route, we have three things:<br \/>\n1. URL received (eg. &#8216;\/videos&#8217;)<br \/>\n2. TemplateUrl &#8211; The HTML template to load for the URL received<br \/>\n3. Controller- The controller function that the templateUrl will use<br \/>\nThus, the first route in the module defined in line 5 above states that, when the relative URL &#8216;\/videos&#8217; is received, load the videoDetail.html template into the layout page(main.html) and use the properties and methods defined in the controller function VideoController.<\/p>\n<p>Here is how our new module is used.<\/p>\n<p>[html]<br \/>\nFile : main.html<br \/>\n&lt;!Doctype html&gt;<br \/>\n&lt;html ng-app=&quot;videoModule&quot;&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;script type=&quot;text\/javascript&quot; src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.0.1\/angular.min.js&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;script type=&quot;text\/javascript&quot; src=&quot;js\/modules.js&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;script type=&quot;text\/javascript&quot; src=&quot;js\/controllers.js&quot;&gt;&lt;\/script&gt;<br \/>\n&lt;style type=&quot;text\/css&quot;&gt;<br \/>\n\tli{list-style:none;float:left;padding:20px;}<br \/>\n\ta{text-decoration:none;}<br \/>\n&lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n\t&lt;div ng-view&gt;&lt;\/div&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n[\/html]<\/p>\n<p>We tell the application to use our new module by using ng-app=&#8221;videoModule&#8221;. Then we included the modules.js file and controllers.js(will show later) file by using the script tag. In the\u00a0body, we use ng-view attribute. It allows the appropriate template to be inserted into place when a particular URL is received. The template to be inserted is decided by the routing that we have defined in our module. For example, as per routes defined by &#8216;videoModule&#8217;, if URL &#8216;main.html\/videos&#8217; is received, template videoList.html is rendered inside the div containing the ng-view attribute.<\/p>\n<p>We will also need two controller functions- VideoController and VideoDetailController. It&#8217;s a good idea to put all our controller functions in a separate file.<\/p>\n<p>[javascript]<br \/>\nFile : js\/controllers.js<br \/>\nfunction VideoController($http,$scope){<br \/>\n\t$http.get(&#8216;videoList.json&#8217;).success(function(videoList) {<br \/>\n\t\t$scope.data = videoList;<br \/>\n\t});<br \/>\n}<\/p>\n<p>function VideoDetailController($scope,$routeParams,$http){<br \/>\n\t$http.get(&#8216;video&#8217;+$routeParams.videoId+&#8217;Detail.json&#8217;).success(function(videoDetail) {<br \/>\n\t\t$scope.data = videoDetail;<br \/>\n\t});<br \/>\n}<br \/>\n[\/javascript]<\/p>\n<p>The function VideoController() will fetch the\u00a0list of videos from a json file and assign that list to a local variable. The template videoList.html then uses that local variable to show the list of videos.<\/p>\n<p>Now, we need two templates &#8211;<br \/>\n1. videoList.html &#8211; To show the list of videos. When a\u00a0user clicks on any of the videos, he will be taken to the\u00a0detail page for that video.<br \/>\n2. videoDetail.html &#8211; This will show details of the video<\/p>\n<p>[html]<br \/>\nFile : videoList.html<br \/>\n&lt;div&gt;<br \/>\n\t&lt;ul&gt;<br \/>\n\t\t&lt;li ng-repeat=&quot;datum in data&quot;&gt;<br \/>\n\t\t\t&lt;a href=&quot;#\/videos\/{{datum.id}}&quot;&gt;{{datum.name}}&lt;\/a&gt;<br \/>\n\t\t&lt;\/li&gt;<br \/>\n\t&lt;\/ul&gt;<br \/>\n&lt;\/div&gt;<br \/>\n[\/html]<\/p>\n<p>[html]<br \/>\nFile : videoDetail.html<br \/>\n&lt;img ng-src=&quot;{{data.thumbUrl}}&quot; \/&gt;<br \/>\n&lt;br \/&gt;Name : {{data.name}}<br \/>\n&lt;br \/&gt;Id : {{data.id}}<br \/>\n&lt;br \/&gt;Views : {{data.views}}<br \/>\n&lt;br \/&gt;Comments : {{data.comments}}<br \/>\n[\/html]<\/p>\n<p>When the application starts, the page main.html is loaded. According to route definitions specified in videoModule, it will match the route &#8216;otherwise&#8217; and thus a\u00a0user will be redirected to &#8216;main.html#\/videos&#8217;. The corresponding template videoList.html will be loaded into main.html. Post this a user will see a list of videos. When a\u00a0user clicks on a video, for example, video with id 2, the resulting URL will be &#8216;main.html#\/videos\/2&#8217;. This URL corresponds to route &#8216;\/videos\/:videoId&#8217;, where the value of videoId=2.<\/p>\n<p>Thus the template &#8216;videoDetail.html&#8217; is loaded into the main.html. The value of videoId can be retrieved from route &#8216;\/videos\/:videoId&#8217; by using the $routeParams.videoId as shown in the videoDetailController function. This function simply fetches data of the selected video from its json file and assigns it to a local variable, which is then used by the videoDetail.html template to show details of video. For example, if videoId=2, then the json file from which data will be fetched is video2Detail.json.<\/p>\n<p>That was just a small example illustrating concept of routes and multiple views in AngularJS. I will be back with more.<\/p>\n<p><span style=\"font-size: 20px; color: blue;\">Read Further on AngularJS Series<\/span><\/p>\n<ul>\n<li><a href=\"https:\/\/tothenewco.pro\/blog\/angularjs-a-write-less-do-more-javascript-framework\/\">AngularJS : A \u201cWrite Less Do More\u201d JavaScript Framework<\/a><\/li>\n<li><a href=\"https:\/\/tothenewco.pro\/blog\/angularjs-updating-a-label-dynamically-with-user-input\/\">AngularJS : Updating a Label Dynamically with User Input<\/a><\/li>\n<li><a href=\"https:\/\/tothenewco.pro\/blog\/angularjs-adding-items-to-a-javascript-list-and-updating-corresponding-dom-dynamically\/\">AngularJS : Adding Items to a JavaScript List and updating corresponding DOM Dynamically<\/a><\/li>\n<li><a href=\"https:\/\/tothenewco.pro\/blog\/angularjs-text-suggestions\/\">AngularJS : Text Suggestions<\/a><\/li>\n<li><a href=\"https:\/\/tothenewco.pro\/blog\/angularjs-sorting-objects-on-various-attributes\/\">AngularJS : Sorting objects on various attributes<\/a><\/li>\n<li><a href=\"https:\/\/tothenewco.pro\/blog\/angularjs-fetching-data-from-the-server\/\"> AngularJS : Fetching data from the server<\/a><\/li>\n<li><a href=\"https:\/\/tothenewco.pro\/blog\/angularjs-multiple-views-layout-template-and-routing\/\">AngularJS : Multiple Views, Layout Template and Routing<\/a><\/li>\n<li><a href=\"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/\">AngularJS : Implementing Routes And Multiple Views<\/a><\/li>\n<li><a href=\"https:\/\/tothenewco.pro\/blog\/building-intuitive-frontend-interfaces-with-angularjs\/\">Building Intuitive Frontend Interfaces with AngularJS<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have already seen the concept of routes and multiple views in my previous blog. Now let&#8217;s see how to implement it in code. To implement the concept of routing in AngularJS, we need to create modules. Inside a module config, we can define routes. [javascript] File : js\/modules.js angular.module(&#8216;videoModule&#8217;, []). config([&#8216;$routeProvider&#8217;, function($routeProvider) { $routeProvider. [&hellip;]<\/p>\n","protected":false},"author":46,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":10,"footnotes":""},"categories":[1439,3429],"tags":[3180,3955,955,4697,1852,1101,1100],"class_list":["post-9050","post","type-post","status-publish","format-standard","hentry","category-angular","category-front-end-development","tag-angular-2","tag-angular-development","tag-angularjs","tag-angularjs-development-company","tag-front-end","tag-multiple-views","tag-routes"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Steps to implement Routes And Multiple Views in AngularJS\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"raj\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"AngularJS: Implementing Routes And Multiple Views | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Steps to implement Routes And Multiple Views in AngularJS\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"AngularJS: Implementing Routes And Multiple Views | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Steps to implement Routes And Multiple Views in AngularJS\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/#article\",\"name\":\"AngularJS: Implementing Routes And Multiple Views | TO THE NEW Blog\",\"headline\":\"AngularJS: Implementing Routes And Multiple Views\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/raj\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2012-10-12T13:05:21+05:30\",\"dateModified\":\"2017-08-03T14:04:40+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/#webpage\"},\"articleSection\":\"AngularJS, Front End Development, Angular 2, angular development, AngularJS, AngularJS Development Company, front-end, multiple-views, routes\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/angular\\\/#listItem\",\"name\":\"AngularJS\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/angular\\\/#listItem\",\"position\":2,\"name\":\"AngularJS\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/angular\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/#listItem\",\"name\":\"AngularJS: Implementing Routes And Multiple Views\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/#listItem\",\"position\":3,\"name\":\"AngularJS: Implementing Routes And Multiple Views\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/angular\\\/#listItem\",\"name\":\"AngularJS\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/raj\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/raj\\\/\",\"name\":\"raj\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a9d46e1b8343293e046cadae61788af301ac4dd357dd9b9da5ddb3e9e5000222?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"raj\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/\",\"name\":\"AngularJS: Implementing Routes And Multiple Views | TO THE NEW Blog\",\"description\":\"Steps to implement Routes And Multiple Views in AngularJS\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/angularjs-implementing-routes-and-multiple-views\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/raj\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/raj\\\/#author\"},\"datePublished\":\"2012-10-12T13:05:21+05:30\",\"dateModified\":\"2017-08-03T14:04:40+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"AngularJS: Implementing Routes And Multiple Views | TO THE NEW Blog","description":"Steps to implement Routes And Multiple Views in AngularJS","canonical_url":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/#article","name":"AngularJS: Implementing Routes And Multiple Views | TO THE NEW Blog","headline":"AngularJS: Implementing Routes And Multiple Views","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/raj\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"datePublished":"2012-10-12T13:05:21+05:30","dateModified":"2017-08-03T14:04:40+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/#webpage"},"articleSection":"AngularJS, Front End Development, Angular 2, angular development, AngularJS, AngularJS Development Company, front-end, multiple-views, routes"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/angular\/#listItem","name":"AngularJS"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/angular\/#listItem","position":2,"name":"AngularJS","item":"https:\/\/tothenewco.pro\/blog\/category\/angular\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/#listItem","name":"AngularJS: Implementing Routes And Multiple Views"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/#listItem","position":3,"name":"AngularJS: Implementing Routes And Multiple Views","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/angular\/#listItem","name":"AngularJS"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/raj\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/raj\/","name":"raj","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a9d46e1b8343293e046cadae61788af301ac4dd357dd9b9da5ddb3e9e5000222?s=96&d=mm&r=g","width":96,"height":96,"caption":"raj"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/","name":"AngularJS: Implementing Routes And Multiple Views | TO THE NEW Blog","description":"Steps to implement Routes And Multiple Views in AngularJS","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/raj\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/raj\/#author"},"datePublished":"2012-10-12T13:05:21+05:30","dateModified":"2017-08-03T14:04:40+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"AngularJS: Implementing Routes And Multiple Views | TO THE NEW Blog","og:description":"Steps to implement Routes And Multiple Views in AngularJS","og:url":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"AngularJS: Implementing Routes And Multiple Views | TO THE NEW Blog","twitter:description":"Steps to implement Routes And Multiple Views in AngularJS","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"9050","title":null,"description":"Steps to implement Routes And Multiple Views in AngularJS","keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 14:54:57","updated":"2024-02-29 08:31:26","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/angular\/\" title=\"AngularJS\">AngularJS<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tAngularJS: Implementing Routes And Multiple Views\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"AngularJS","link":"https:\/\/tothenewco.pro\/blog\/category\/angular\/"},{"label":"AngularJS: Implementing Routes And Multiple Views","link":"https:\/\/tothenewco.pro\/blog\/angularjs-implementing-routes-and-multiple-views\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/9050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=9050"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/9050\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=9050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=9050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=9050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}