{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/2381","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2381/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2381/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2381/events","html_url":"https://github.com/angular-ui/ui-router/issues/2381","id":117875340,"number":2381,"title":"Dynamic view names based on the parameters returned while calling the state","user":{"login":"modikejal10","id":1766468,"avatar_url":"https://avatars.githubusercontent.com/u/1766468?v=3","gravatar_id":"","url":"https://api.github.com/users/modikejal10","html_url":"https://github.com/modikejal10","followers_url":"https://api.github.com/users/modikejal10/followers","following_url":"https://api.github.com/users/modikejal10/following{/other_user}","gists_url":"https://api.github.com/users/modikejal10/gists{/gist_id}","starred_url":"https://api.github.com/users/modikejal10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modikejal10/subscriptions","organizations_url":"https://api.github.com/users/modikejal10/orgs","repos_url":"https://api.github.com/users/modikejal10/repos","events_url":"https://api.github.com/users/modikejal10/events{/privacy}","received_events_url":"https://api.github.com/users/modikejal10/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-19T18:18:21Z","updated_at":"2015-12-03T01:10:15Z","closed_at":"2015-12-03T01:10:15Z","body":"I am using Kendo tabstrip with angular ng-repeat and ui-router. Now the tabstrip can have different combination and different number of tabs based on the input. I am able to give different ui-sref and ui-view names to each tab while adding tabs dynamically using angular ng-repeat. \r\n```\r\ndiv class=\"demo-section k-content\"\r\n            div kendo-tab-strip=\"detailsTabStrip\" k-ng-delay=\"Tabs\"\r\n              ul\r\n                li \r\n                ng-repeat=\"tab in Tabs\" ng-class=\"getClass($first,tab)\" ui-sref=\"{{tab.sref}}\"   \r\n                 {{tab.name}}\r\n               /li   \r\n              /ul\r\n\r\n               div ng-repeat=\"tab in Tabs\" ui-view=\"{{tab.view}}\"\r\n              /div\r\n            /div\r\n    /div\r\n```\r\nSo, this code gives an individual ui-view to each tab. There can 150 different types of views possible in tabs. So, I cannot hard code the view names in the router file. I need the router to accept a parameter for view name or atleast in some way I can let the router know which view to populate with the html.\r\n```\r\n$stateProvider\r\n        .state('details.tab', {\r\n        \turl:'/tab/:tabName',\r\n            views:{\r\n```\r\n//the view name should be able to either read the stateparam and //accordingly assign template or should atleast be able to read the state and accordingly assign the //template or if views can be a function.\r\n```\r\n            \t\"details.{{tabName}}\":{\r\n            \t\ttemplateUrl: 'resources/pages/grid.html',\r\n                    controller: 'gridController'\r\n            \t}\r\n            }\r\n        });\r\n```\r\n  Is it possible to make the views names dynamic in any way. There are other parts in the application which have absolute ui-view defined and work perfectly. The changes made to make views names dynamic for this part should not affect the other parts of application. Can I use relative views to achieve this in any way? Thanks for all the help.\r\n"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/161484346","html_url":"https://github.com/angular-ui/ui-router/issues/2381#issuecomment-161484346","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2381","id":161484346,"user":{"login":"eddiemonge","id":127535,"avatar_url":"https://avatars.githubusercontent.com/u/127535?v=3","gravatar_id":"","url":"https://api.github.com/users/eddiemonge","html_url":"https://github.com/eddiemonge","followers_url":"https://api.github.com/users/eddiemonge/followers","following_url":"https://api.github.com/users/eddiemonge/following{/other_user}","gists_url":"https://api.github.com/users/eddiemonge/gists{/gist_id}","starred_url":"https://api.github.com/users/eddiemonge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddiemonge/subscriptions","organizations_url":"https://api.github.com/users/eddiemonge/orgs","repos_url":"https://api.github.com/users/eddiemonge/repos","events_url":"https://api.github.com/users/eddiemonge/events{/privacy}","received_events_url":"https://api.github.com/users/eddiemonge/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T01:10:15Z","updated_at":"2015-12-03T01:10:15Z","body":"Are all the tabs shown at once? If not, why not have one ui-view that gets populated with the tab content? This also seems like a better question for stackoverflow like this: http://stackoverflow.com/questions/30000462/dynamic-view-names-with-ui-router or maybe take a look at this: https://github.com/angular-ui/ui-router/issues/1324\r\n\r\nIf you do find there is an actual bug, let me know and I will reopen this."}}