'use strict';

angular.module('etestApp')
  .config(function ($stateProvider) {
    $stateProvider
      .state('main.verbal', {
        url: 'exam/verbal',
        templateUrl: 'app/exam/verbal/verbal.html',
        controller: 'VerbalController as vm'
      }).state('main.tcsverbal', {
        url: 'exam/tcs/verbal',
        templateUrl: 'app/exam/verbal/tcs/tcs.verbal.html',
        controller: 'TCSVerbalController as vm'
      }).state('main.tcsverbalexam', {
        authenticate:true,
        url: 'exam/tcs/verbal/:id',
        templateUrl: 'app/exam/verbal/tcs/tcs.verbal.exam.html',
        controller: 'TCSVerbalExamController as vm'
      }).state('main.tcsverbalexamresult', {
        url: 'exam/tcs/verbal/:id/result',
        templateUrl: 'app/exam/verbal/tcs/tcs.verbal.exam.result.html',
        controller: 'TCSVerbalExamResultController as vm'
      }).state('main.aptitude', {
        url: 'exam/aptitude',
        templateUrl: 'app/exam/aptitude/aptitude.html',
        controller: 'AptitudeController as vm'
      }).state('main.tcsaptitude', {
        url: 'exam/tcs/aptitude',
        templateUrl: 'app/exam/aptitude/tcs/tcs.aptitude.html',
        controller: 'TCSAptitudeController as vm'
      }).state('main.tcsaptitudeexam', {
      url: 'exam/tcs/aptitude/:id',
      templateUrl: 'app/exam/aptitude/tcs/tcs.aptitude.exam.html',
      controller: 'TCSAptitudeExamController as vm'
    }).state('main.tcsaptitudeexamresult', {
      url: 'exam/tcs/aptitude/:id/result',
      templateUrl: 'app/exam/aptitude/tcs/tcs.aptitude.exam.result.html',
      controller: 'TCSAptitudeExamResultController as vm'
    });
  });

'use strict';

angular.module('etestApp')
  .config(function ($stateProvider) {
    $stateProvider
      .state('main.verbal', {
        url: 'exam/verbal',
        templateUrl: 'app/exam/verbal/verbal.html',
        controller: 'VerbalController as vm'
      }).state('main.tcsverbal', {
      url: 'exam/tcs/verbal',
      templateUrl: 'app/exam/verbal/tcs/tcs.verbal.html',
      controller: 'TCSVerbalController as vm'
    }).state('main.tcsverbalexam', {
      authenticate: true,
      url: 'exam/tcs/verbal/:id',
      templateUrl: 'app/exam/verbal/tcs/tcs.verbal.exam.html',
      controller: 'TCSVerbalExamController as vm'
    }).state('main.tcsverbalexamresult', {
      url: 'exam/tcs/verbal/:id/result',
      templateUrl: 'app/exam/verbal/tcs/tcs.verbal.exam.result.html',
      controller: 'TCSVerbalExamResultController as vm'
    }).state('main.aptitude', {
      url: 'exam/aptitude',
      templateUrl: 'app/exam/aptitude/aptitude.html',
      controller: 'AptitudeController as vm'
    }).state('main.tcsaptitude', {
      url: 'exam/tcs/aptitude',
      templateUrl: 'app/exam/aptitude/tcs/tcs.aptitude.html',
      controller: 'TCSAptitudeController as vm'
    }).state('main.tcsaptitudeexam', {
      authenticate: true,
      url: 'exam/tcs/aptitude/:id',
      templateUrl: 'app/exam/aptitude/tcs/tcs.aptitude.exam.html',
      controller: 'TCSAptitudeExamController as vm'
    }).state('main.tcsaptitudeexamresult', {
      authenticate: true,
      url: 'exam/tcs/aptitude/:id/result',
      templateUrl: 'app/exam/aptitude/tcs/tcs.aptitude.exam.result.html',
      controller: 'TCSAptitudeExamResultController as vm'
    });
  });

Add authentication to routes