title: ui router nested views condtions
body: <p>is it possible to create a nested views in ui router with conditions?
  The conditions is assigned to the user roles.</p>
  
  <p>For example I have two types of users: <strong>admin</strong> and <strong>user</strong>.
  If user is opening the setting page then ui router is adding only this view which is assign to his role.</p>
  
  <p>Here is example of my config code</p>
  
  <pre><code>var app = angular.module('myApp', ['ui.router']);        
  app.config(function ($stateProvider, $urlRouterProvider){    
      $stateProvider
          .state('home', {
              url: '/home',
              templateUrl: '/home.html',
              controller: 'homeController'
          })
          .state('settings', {
              url: '/settings',
              data: {
                  roles: ['admin', 'moderator', 'user']
              },
              views:{
                  '':{
                      templateUrl:'/settings.html',
                  },
                  'piView@settings':{
                      data: {
                          roles: ['user']
                      },
                      templateUrl:'/personalInformation.html'
                  },
                  'permissionsView@settings':{//load this view if user is administrator
                                              //I need some condition for this
                      data: {
                          roles: ['admin']
                      },
                      templateUrl: '/permissionsView.html'
                  }
              },
              controller: 'settingsController'
          });         
      $urlRouterProvider.otherwise( function($injector) {
        var $state = $injector.get("$state");
        $state.go('/home');
      });
  });
  </code></pre>