text: 'use strict';
  
  // Setting up route
  angular.module('posts').config(['$stateProvider',
    function ($stateProvider) {
      // Articles state routing
      $stateProvider
        .state('posts', {
          abstract: true,
          url: '/posts',
          template: '<ui-view/>'
        })
        .state('posts.list', {
          url: '',
          templateUrl: 'modules/posts/client/views/main.client.view.html'
        })
        .state('posts.create', {
          url: '/create',
          templateUrl: 'modules/posts/client/views/create-article.client.view.html',
          data: {
            roles: ['user', 'admin']
          }
        })
        .state('posts.view', {
          url: '/:postId',
          templateUrl: 'modules/articles/client/views/view-article.client.view.html'
        })
        .state('posts.edit', {
          url: '/:postId/edit',
          templateUrl: 'modules/articles/client/views/edit-article.client.view.html',
          data: {
            roles: ['user', 'admin']
          }
        });
    }
  ]);
  