{"id":525,"date":"2015-09-29T08:26:48","date_gmt":"2015-09-29T06:26:48","guid":{"rendered":"http:\/\/blog.thecodecampus.de\/?p=525"},"modified":"2023-12-20T20:23:09","modified_gmt":"2023-12-20T19:23:09","slug":"named-ui-views-with-angularjs-ui-router-and-ui-bootstrap","status":"publish","type":"post","link":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/","title":{"rendered":"Named ui-views with AngularJS, ui-router and ui-bootstrap"},"content":{"rendered":"<h3>Tipps and Tricks<\/h3>\n<p>In one of my last tasks I have had\u00a0the necessity of adapting a section of a single page application (SPA), in order to get ui-router and ui-bootstrap (plus Bootstrap CSS) work together.<\/p>\n<p>In this article I will shortly share with you the result of my experience, by showing how to improve\u00a0the coexistence of AngularJS, ui-router and ui-bootstrap via\u00a0some &#8222;tricks&#8220; that can ease the creation and maintenance of your single page applications.<\/p>\n<p>In particular, I will discuss how to manage the advanced injection of content in multiple views and, at the same time, how to handle the navigation within the application via the State Provider\u00a0of ui-router. Such\u00a0elements\u00a0are\u00a0not distant from what also the ui-router official guide describes and are aspects that\u00a0you would need when switching from a basic to an advanced usage of the tool.<\/p>\n<p>At the end of the article you will\u00a0find a working example, containing what I will describe in the next paragraphs. I suggest you to firstly read the description, in order to understand the details of the\u00a0example.<\/p>\n<h3>Let&#8217;s Go with ui-router<\/h3>\n<p>As is generally\u00a0known, ui-router doesn&#8217;t comes bundled in AngularJS, instead it&#8217;s\u00a0a separate tool that you can <a href=\"https:\/\/github.com\/angular-ui\/ui-router\" target=\"_blank\" rel=\"noopener\">integrate<\/a> in you project. The same for <a href=\"https:\/\/angular-ui.github.io\/bootstrap\/\">ui-bootstrap<\/a>.\u00a0In the following description I will presume that you are already able to move your first steps with both those libraries and that you know (more or less) the elements\u00a0on which they are based on (for a good starting point to learn ui-router I suggest you <a href=\"https:\/\/egghead.io\/lessons\/angularjs-introduction-ui-router\">this video<\/a>).<\/p>\n<p>Theory apart, the minimal set of elements that you need, to catch the meaning of the suggestions I want to share with you, is:<\/p>\n<ul>\n<li>An index.html page that you would\u00a0use as starting point of your SPA (i.e. as container for some menu entries)\n<pre class=\"lang:xhtml decode:true\">&lt;!DOCTYPE html&gt;\r\n&lt;html ng-app=\"uiTabs\"&gt;\r\n&lt;!--..your dependancies...--&gt;\r\n&lt;body ng-controller=\"MenuCtrl\"&gt; \r\n  &lt;div class=\"container-fluid\"&gt;\r\n  &lt;!--..bootstrap adaptive container...--&gt;\r\n    &lt;div class=\"row\"&gt;\r\n     &lt;div class=\"col-md-2\"&gt;\r\n       &lt;ul class=\"nav nav-list\"&gt;\r\n         &lt;li ng-repeat=\"item in menu\"&gt;\r\n           &lt;a ui-sref=\"{{item.state}}\"&gt;{{item.name}}&lt;\/a&gt;\r\n           &lt;!--..ui-sref links to a ui-router\u00b4s state instead of a simple href...--&gt;\r\n         &lt;\/li&gt;\r\n       &lt;\/ul&gt;\r\n     &lt;\/div&gt;\r\n     &lt;div class=\"col-md-8\"&gt;\r\n      &lt;div ui-view&gt;&lt;\/div&gt; \r\n       &lt;!--Each Element of the app will be injected here --&gt;\r\n       &lt;!-- ui-view is the element that a state will search in order to inject its view--&gt;\r\n     &lt;\/div&gt;  \r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<\/li>\n<li>An Angular Module where to inject the ui-router and ui-bootstrap dependencies\n<pre class=\"lang:js decode:true\">var app = angular.module('uiTabs', ['ui.bootstrap', 'ui.router']);\r\n<\/pre>\n<\/li>\n<li>A Controller for the index.html\n<pre class=\"lang:js decode:true\">app.controller('MenuCtrl', ['$scope', '$stateParams', '$state',\r\n function($scope) { \r\n  $scope.menu = [{state: 'tabs', name: 'Example Tabs'},\r\n                 {state: 'content', name: 'Example Content'}];\r\n }\r\n]);\r\n<\/pre>\n<\/li>\n<li>A Config for your App where you can define each state&#8217;s behavior\n<pre class=\"lang:js decode:true\">app.config(function($stateProvider, $locationProvider, $urlRouterProvider) {\r\n});<\/pre>\n<\/li>\n<\/ul>\n<p>Now, what you\u00a0would normally do, in order to define the states associated with each menu entry is:<\/p>\n<pre class=\"lang:js decode:true\"> $stateProvider.\r\n  .state('tabs', {\r\n    url: '\/tabs',\r\n    template: \"&lt;div id='container'&gt;&lt;h1&gt;{{voice}}&lt;\/h1&gt;&lt;br\/&gt;&lt;div ui-view&gt;&lt;\/div&gt; &lt;\/div&gt;\",\r\n    controller: function($scope, text) {\r\n          $scope.voice = \"Content example --tabs--\";\r\n         }\r\n    })\r\n  .state('content', {\r\n    url: '\/content',\r\n    template: \"&lt;div id='container'&gt;&lt;h1&gt;{{voice}}&lt;\/h1&gt;{{text}}&lt;br\/&gt;&lt;div ui-view&gt;&lt;\/div&gt;&lt;\/div&gt;\",\r\n    controller: function($scope, text) {\r\n          $scope.voice = \"Content example --Content--\";\r\n          $scope.text = text;\r\n         },\r\n    resolve: {text: function($http) {\r\n          return $http.get(\/*your rest service that delivers the content*\/)\r\n                      .then(function(result) {\r\n                            return result.data;\r\n                           });\r\n         }\r\n        },\r\n    })<\/pre>\n<p>This would let you simply navigate between the states with your index&#8217;s buttons, while:<\/p>\n<ul>\n<li>ui-router injects the active state&#8217;s view in the &lt;<em>div ui-view&gt;&lt;\/div&gt;\u00a0<\/em>of the index.html,<\/li>\n<li>activates the state&#8217;s controller<\/li>\n<li>(eventually), pre-resolves data.<\/li>\n<\/ul>\n<p>Obviously, being that each state&#8217;s template contains its own &lt;<em>div ui-view&gt;&lt;\/div&gt;<\/em>, you can\u00a0easily create some sub-states (i.e., tabs.list or content.submenu) and inject them, in turn, in the related parent&#8217;s state. This is wonderful! This is what ui-router, basically, has been designed for!<\/p>\n<p>But, what if we would want\/need to have a more complicated situation, with <strong>multiple<\/strong>\u00a0<strong>views, injected within other views and, at\u00a0the same time, parallel views\u00a0one next to another?\u00a0<\/strong>(click <a href=\"https:\/\/app.moqups.com\/porcino@w11k.de\/Q6V7C1lEV1\/view\/page\/a6c880489\">here<\/a>\u00a0to go to the mockup)<\/p>\n<p><a href=\"https:\/\/app.moqups.com\/porcino@w11k.de\/Q6V7C1lEV1\/view\/page\/a6c880489\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-562\" src=\"http:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2015\/09\/multiple-views-1024x836.jpg\" alt=\"Example of parallel and nested multiple views\" width=\"600\" height=\"490\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2015\/09\/multiple-views-1024x836.jpg 1024w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2015\/09\/multiple-views-300x245.jpg 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2015\/09\/multiple-views.jpg 1080w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Multiple\u00a0named views and abstract states<\/h3>\n<h4>Multiple named views<\/h4>\n<p>The solution comes with ui-router itself, under the name of (<strong>multiple<\/strong>)\u00a0<b>named views.<\/b> In practice, instead of just decorating\u00a0a state with a single view (and a controller) we consider a state as, potentially, made of <strong>many<\/strong> views. Each view will be identified via its own <strong>name<\/strong> and will have its own controller (and data). The views will\u00a0live within their\u00a0state, being therefore activated when the navigation &#8222;wakes&#8220; the state (per \/url, per $state.go or per ui-sref ).<\/p>\n<p>This perspective is something like (1 state)-to-(n views). What ui-router enables is also (1 ui-view)-to-(n states). This means that you can\u00a0control which <strong>view<\/strong>, from which <strong>state<\/strong> will be injected in\u00a0<strong>which ui-view.<\/strong> This lets you injecting each view within each other, creating complex structures with substructures.<\/p>\n<p>From theory to practice: all it&#8217;s based upon 3 elements:<\/p>\n<ul>\n<li>A name for the ui-view (you need it to identify <strong>where<\/strong> to inject your view)\n<pre class=\"lang:js decode:true\">&lt;div ui-view ='tabsView'&gt;&lt;\/div&gt;<\/pre>\n<\/li>\n<li>The state <span style=\"text-decoration: underline;\">in which<\/span> the view that contains\u00a0the ui-view <span style=\"text-decoration: underline;\">is defined<\/span><\/li>\n<li>The definition of the <strong>NAME<\/strong>\u00a0of each view (which controls everything)\n<pre class=\"lang:js decode:true\">    .state('tabs.first', {\r\n      url: '\/insideTab1',\r\n      views: {\r\n        \"tabsView@tabs\": {\r\n          template: \"&lt;h5&gt;First Tab's Menu Voice 1&lt;\/h5&gt;{{text}}\"....\r\n        }\r\n      }\r\n    })<\/pre>\n<\/li>\n<\/ul>\n<p>The name of each view is made of: <em>theNameOfThe<strong>Target<\/strong>UiView@theNameOfTheState.<strong>ThatContains<\/strong>The.UiView.<\/em><\/p>\n<p>In other words, you can use the name of the view to define <span style=\"text-decoration: underline;\">where<\/span> (in terms of state and ui-view) the view itself will be injected. You can think at this namespace as a way to define the routes of your application and to attach each of them to your SPA&#8217;s workflow.<\/p>\n<h4>Abstract states<\/h4>\n<p>Another element that I suggest you to use, when working with multiple ui-routes, is the definition of proper <strong>abstract<\/strong> states. These are states that you can&#8217;t directly access, but only navigate <span style=\"text-decoration: underline;\">through<\/span>. Those are perfect for data pre-resolution or for global element&#8217;s definition. An example of that can be the following definition of a set of bootstrap&#8217;s Tabs for our sample application:<\/p>\n<ul>\n<li>The view of the abstract state (\/tabs.tpl.html):\n<pre class=\"lang:js decode:true\">&lt;h1&gt;Tab Design 4 ui-router&lt;\/h1&gt;\r\n&lt;ul class=\"nav nav-tabs\"&gt;\r\n\u00a0\u00a0\u00a0 &lt;li ui-sref-active=\"active\"&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;a ui-sref=\"tabs.first\"&gt;Menu Tab&lt;\/a&gt;\r\n\u00a0\u00a0\u00a0 &lt;\/li&gt;\r\n\u00a0\u00a0\u00a0 &lt;li ui-sref-active=\"active\"&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;a ui-sref=\"tabs.second.content\"&gt;Content Tab&lt;\/a&gt;\r\n\u00a0\u00a0\u00a0 &lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n\r\n&lt;div ui-view ='tabs'&gt;&lt;\/div&gt;<\/pre>\n<\/li>\n<li>And the related state&#8217;s definition:\n<pre class=\"lang:js decode:true \">\u00a0 $stateProvider\r\n\u00a0\u00a0\u00a0 .state('tabs', {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 url: '\/tabs',\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 views: {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"mainView\": { \/\/hence, you need to name \"mainView\" the ui-view div in the index.html \r\n                      \/\/and make the proper changes also in the content view\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 abstract: true,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 templateUrl: \"tabs.tpl.html\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 controller: function($scope, text) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/Controller in the abstract state is used only\r\n            \/\/ to set \"global\" elements for the state and the sub-states\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $scope.title = \"Tab Design 4 ui-router\";\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $scope.text = text;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 resolve: {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 text: function($http) {\r\n              \/\/RESOLVE IN THE ABSTRACT STATE ONLY AND ONLY ELEMENTS THAT ARE USEFUL\r\n              \/\/ IN EACH SUB-STATE TO AVOID CONFUSION WITH THE SCOPES\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return $http.get(\/*your rest service*\/ ).then(function(result) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return result.data;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 });\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0 })\r\n<\/pre>\n<\/li>\n<\/ul>\n<p>This way, each tab (say <em>tabs.first<\/em> and <em>tabs.second<\/em>) will have the skeleton of the abstract state as template and they will &#8222;live&#8220; within the parent&#8217;s ui-view=&#8220;tabs&#8220;.<\/p>\n<p>Then, we need to define the content of each tab: for this purpose we use the multiple named view system of the previous paragraph! I will omit the rest of the code I want to share with you, because it would be too long for the article, but you can find it in the following <a href=\"http:\/\/plnkr.co\/edit\/hJGO0Z5WinO5Q0njssKW?p=info\">Plunker<\/a>.<\/p>\n<p>Notice, in the <em>app.js<\/em> file how each state contains one or more named views and how each named view is injected in the ui-view declared in its name.<\/p>\n<h4>&#8230;another small hint<\/h4>\n<p>Please consider the code in the <a href=\"http:\/\/plnkr.co\/edit\/hJGO0Z5WinO5Q0njssKW?p=info\">Plunker<\/a>, if you navigate to the &#8222;Example Tabs&#8220; and then click on the &#8222;Content tab&#8220; you will see a &#8222;Replace Content&#8220; button. If you click it, you may notice that the content gets replaced with another and that you can undo this operation by clicking &#8222;Go Back&#8220;. This is reachable via ui-router and the multiple named views, simply by using the same ui-view with two different views of two distinct states. In this example, within the app.js, the &#8222;left_inside_secondTab@tabs.second&#8220; of &#8222;tabs.second.content&#8220; and the &#8222;left_inside_secondTab@tabs.second&#8220; of &#8222;tabs.second.content.replace&#8220;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tipps and Tricks In one of my last tasks I have had\u00a0the necessity of adapting a section of a single page application (SPA), in order to get ui-router and ui-bootstrap (plus Bootstrap CSS) work together. In this article I will shortly share with you the result of my experience, by showing how to improve\u00a0the coexistence [&#8230;]<br \/><a class=\"meta-big\" href=\"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/\"> READ MORE<\/a><\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2],"tags":[62,82,23,14],"class_list":["post-525","post","type-post","status-publish","format-standard","hentry","category-angularjs","category-javascript","tag-angularjs","tag-bootstrap","tag-routing","tag-ui"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Named ui-views with AngularJS, ui-router and ui-bootstrap - Web Development Blog<\/title>\n<meta name=\"description\" content=\"How to render multiple parallel and nested views with AngularJS and ui-router.How to render multiple parallel and nested views with AngularJS and ui-router.\" \/>\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.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Named ui-views with AngularJS, ui-router and ui-bootstrap - Web Development Blog\" \/>\n<meta property=\"og:description\" content=\"How to render multiple parallel and nested views with AngularJS and ui-router.How to render multiple parallel and nested views with AngularJS and ui-router.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Development tips and tricks - theCodeCampus Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-29T06:26:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-20T19:23:09+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2015\/09\/multiple-views-1024x836.jpg\" \/>\n<meta name=\"author\" content=\"theCodeCampus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"theCodeCampus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"5\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/\"},\"author\":{\"name\":\"theCodeCampus\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/276bbda2f8da73154f22fb652201cfbc\"},\"headline\":\"Named ui-views with AngularJS, ui-router and ui-bootstrap\",\"datePublished\":\"2015-09-29T06:26:48+00:00\",\"dateModified\":\"2023-12-20T19:23:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/\"},\"wordCount\":1055,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/blog.thecodecampus.de\\\/wp-content\\\/uploads\\\/2015\\\/09\\\/multiple-views-1024x836.jpg\",\"keywords\":[\"AngularJS\",\"Bootstrap\",\"Routing\",\"UI\"],\"articleSection\":[\"AngularJS 1\",\"JavaScript\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/\",\"name\":\"Named ui-views with AngularJS, ui-router and ui-bootstrap - Web Development Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/blog.thecodecampus.de\\\/wp-content\\\/uploads\\\/2015\\\/09\\\/multiple-views-1024x836.jpg\",\"datePublished\":\"2015-09-29T06:26:48+00:00\",\"dateModified\":\"2023-12-20T19:23:09+00:00\",\"description\":\"How to render multiple parallel and nested views with AngularJS and ui-router.How to render multiple parallel and nested views with AngularJS and ui-router.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/#primaryimage\",\"url\":\"http:\\\/\\\/blog.thecodecampus.de\\\/wp-content\\\/uploads\\\/2015\\\/09\\\/multiple-views-1024x836.jpg\",\"contentUrl\":\"http:\\\/\\\/blog.thecodecampus.de\\\/wp-content\\\/uploads\\\/2015\\\/09\\\/multiple-views-1024x836.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Named ui-views with AngularJS, ui-router and ui-bootstrap\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"name\":\"Web Development tips and tricks - theCodeCampus Blog\",\"description\":\"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\",\"name\":\"theCodeCampus\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"width\":156,\"height\":156,\"caption\":\"theCodeCampus\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/276bbda2f8da73154f22fb652201cfbc\",\"name\":\"theCodeCampus\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg\",\"caption\":\"theCodeCampus\"},\"description\":\"Our knowledge is not simply gained through reading - it is trained, tested and constantly being expanded. Because first and foremost, we are all developers at W11K. The know-how that we acquire here as developers, consultants and information architects flows immediately into our training courses and articles for theCodeCampus.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/showcase\\\/thecodecampus\\\/\"],\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Named ui-views with AngularJS, ui-router and ui-bootstrap - Web Development Blog","description":"How to render multiple parallel and nested views with AngularJS and ui-router.How to render multiple parallel and nested views with AngularJS and ui-router.","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.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/","og_locale":"de_DE","og_type":"article","og_title":"Named ui-views with AngularJS, ui-router and ui-bootstrap - Web Development Blog","og_description":"How to render multiple parallel and nested views with AngularJS and ui-router.How to render multiple parallel and nested views with AngularJS and ui-router.","og_url":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/","og_site_name":"Web Development tips and tricks - theCodeCampus Blog","article_published_time":"2015-09-29T06:26:48+00:00","article_modified_time":"2023-12-20T19:23:09+00:00","og_image":[{"url":"http:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2015\/09\/multiple-views-1024x836.jpg","type":"","width":"","height":""}],"author":"theCodeCampus","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"theCodeCampus","Gesch\u00e4tzte Lesezeit":"5\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/#article","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/"},"author":{"name":"theCodeCampus","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/276bbda2f8da73154f22fb652201cfbc"},"headline":"Named ui-views with AngularJS, ui-router and ui-bootstrap","datePublished":"2015-09-29T06:26:48+00:00","dateModified":"2023-12-20T19:23:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/"},"wordCount":1055,"commentCount":1,"publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2015\/09\/multiple-views-1024x836.jpg","keywords":["AngularJS","Bootstrap","Routing","UI"],"articleSection":["AngularJS 1","JavaScript"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/","url":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/","name":"Named ui-views with AngularJS, ui-router and ui-bootstrap - Web Development Blog","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/#primaryimage"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2015\/09\/multiple-views-1024x836.jpg","datePublished":"2015-09-29T06:26:48+00:00","dateModified":"2023-12-20T19:23:09+00:00","description":"How to render multiple parallel and nested views with AngularJS and ui-router.How to render multiple parallel and nested views with AngularJS and ui-router.","breadcrumb":{"@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/#primaryimage","url":"http:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2015\/09\/multiple-views-1024x836.jpg","contentUrl":"http:\/\/blog.thecodecampus.de\/wp-content\/uploads\/2015\/09\/multiple-views-1024x836.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.thecodecampus.de\/blog\/named-ui-views-with-angularjs-ui-router-and-ui-bootstrap\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.thecodecampus.de\/blog\/"},{"@type":"ListItem","position":2,"name":"Named ui-views with AngularJS, ui-router and ui-bootstrap"}]},{"@type":"WebSite","@id":"https:\/\/www.thecodecampus.de\/blog\/#website","url":"https:\/\/www.thecodecampus.de\/blog\/","name":"Web Development tips and tricks - theCodeCampus Blog","description":"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.","publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.thecodecampus.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/www.thecodecampus.de\/blog\/#organization","name":"theCodeCampus","url":"https:\/\/www.thecodecampus.de\/blog\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","width":156,"height":156,"caption":"theCodeCampus"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/276bbda2f8da73154f22fb652201cfbc","name":"theCodeCampus","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch-96x96.jpg","caption":"theCodeCampus"},"description":"Our knowledge is not simply gained through reading - it is trained, tested and constantly being expanded. Because first and foremost, we are all developers at W11K. The know-how that we acquire here as developers, consultants and information architects flows immediately into our training courses and articles for theCodeCampus.","sameAs":["https:\/\/www.linkedin.com\/showcase\/thecodecampus\/"],"url":"https:\/\/www.thecodecampus.de\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/comments?post=525"}],"version-history":[{"count":32,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/525\/revisions"}],"predecessor-version":[{"id":2727,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/525\/revisions\/2727"}],"wp:attachment":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/media?parent=525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/categories?post=525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/tags?post=525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}