无法将数据传递到AngularJS中组件内的控制器

无法将数据传递到AngularJS中组件内的控制器,angularjs,angularjs-controller,angularjs-components,mddialog,Angularjs,Angularjs Controller,Angularjs Components,Mddialog,我有以下组件 componentsModule.component('detailComponent', { templateUrl: 'detailTemplate.html', scope: {}, bindings: { textParam: '=' }, controller: ['$mdDialog', function($mdDialog) { this.textParam // this is undefined

我有以下组件

componentsModule.component('detailComponent', {
    templateUrl: 'detailTemplate.html',
    scope: {},
    bindings: {
        textParam: '='
    },
    controller: ['$mdDialog',  function($mdDialog) {
      this.textParam // this is undefined always
   }]
});
我正在从其他控制器的对话框中加载模板,如下所示

$scope.textParam = tParam;
const parentEl = angular.element(document.body);
$mdDialog.show({
      template: '<detail-component text-param="$scope.textParam"></detail-component>',
      ariaLabel: 'detailComponentDialog',
      parent: parentEl
}).then((savedDatails) => {});
$scope.textParam=tParam;
const parentEl=angular.element(document.body);
$mdDialog.show({
模板:“”,
ariaLabel:“detailComponentDialog”,
家长:家长
})。然后((savedDatails)=>{});

如果我使用绑定作为
@
,那么我会在
this.textParam
中的控制器中以字符串形式获取
$scope.textParam
,但是如果我将绑定设置为
我在这里找到了一个有效的答案。我必须创建一个对话框控制器来显示组件。我在这里找到了一个有效的答案。我必须创建一个对话框控制器来显示组件。