# Call Child Controller from another Controller

I have an application with add and edit modal,when click edit or add ;it’s open a modal.
my Problem is :I want to have a function that’s open a modal Just by call it and this function I want to define it in the root scope,when I do that I have an error in the resolve function.

DefaultModule.controller("navCtrl", function ($scope,$rootScope, $uibModal) {$rootScope.OpenModal = function (templateModalUrl, controllerModal, resolveFun) {
$uibModal.open({ animation: true, templateUrl: templateModalUrl, controller: controllerModal, resolve: { resolveFun } }).result.catch(function (res) { if (!(res === 'cancel' || res === 'escape key press')) { //throw res; } }); } });  calling it: $scope.editBusiness = function (business) {
var ObjResolve = function () {
$rootScope.OpenModal("BusinessTypesModal.html", "ModalInstanceCtrl", ObjResolve); };  and the error that’s I get: Error:$injector:unpr