I want to pass some data to $mdDialog. In fact, I have two controllers in a separate file. Here is my controller code
function openDialog(id) { $mdDialog.show({ locals:{ profileId: id }, controller: ['$scope', 'profileId', function($scope, profileId) { var self = this; self.profileId= profileId; }], controllerAs: 'profileCtrl', templateUrl: 'view/profile.html', parent: angular.element(document.body), clickOutsideToClose:true }) } I want tp pass profileId to profileController and display profile data. In profile controller i get data as this
function profileController($scope,..., profileId){ } but this error apear in console
Error: [$injector:unpr] Unknown provider: profileIdProvider <- profileId<- ProfileController what is this error and how to fix it?