I am using controller in my Angularjs which gets question one by one from server and i want on specific condition this controller should call a routeprovider that should change my current view with templateUrl and put into a directive
my question is can i call route provider in controller rather than module
here is my CreateController
var CreateController = ['$scope', '$http', function ($scope, $http) {
$scope.model = {
    };
................>
.................>
    $scope.NextQuestion = function () {
        $http.post('/Testing/NextQuestion', {
            ........................>
        }).success(function (newdata) {
            $scope.model = newdata;
            var inccomplevel = $scope.model.servercomplevel;
            if (qId == 10) {
                  here i need the code for routeProvider and directive please provide me help
            }
......................>
    }];
i did the route provider in app.js file there it works
here is the code for app.js when i do like this it works and when i shift the code of route provider
to the create controller in condition if qId == 10 there it does not work
var app = angular.module('app', ['ngRoute']);
app.controller('CreateController', CreateController);
    app.config(function ($routeProvider) {
        $routeProvider
        .when('/',
        {
            templateUrl: 'Partials/TestCompleted.html',
            controller: 'AppCtrl'
        })
        .otherwise({ redirectTo: '/' });
    });
    app.controller("AppCtrl",function ($scope) {
        $scope.newmodel = {
        }
    });
 
     
    