I haven't run your code but I think it is because you are re-declaring your angular module multiple times with different names.
var routerApp = angular.module('myApp', ['ui.router'
, 'vendorLoginModule'
, 'ui.bootstrap'
, 'createUser'
, 'ui.grid'
, 'ui.grid.selection'
, 'ui.grid.exporter'
, 'ngLoadingSpinner'
, 'confirm'
, 'transformRequestService'
]);
So the factory portion would become
routerApp.factory('transformRequestAsFormAsPost', ["$http" , function($http){ }]);
And then your controller would then look like
routerApp.controller("confirmController",
['$scope', '$http', '$timeout', '$uibModal', '$log', '$state', '$filter', '$crypthmac', '$rootScope', '$sce', 'transformRequestAsFormAsPost ', function ($scope, $http, $timeout, $uibModal, $log, $state, $filter, $crypthmac, $rootScope, $sce, transformRequestAsFormAsPost) { }]';
By redeclaring your angular.module and not injecting it here
angular.module('confirm', [
.controller('confirmController',
Is why your app is saying unknown provider.
I'm learning angular myself but the route i laid out works for me when implementing factories like this.