Passing data to mdDialog

前端 未结 5 1535
盖世英雄少女心
盖世英雄少女心 2021-01-31 13:37


Main listing page has edit button. Which opens details of the edited row.
Way-1: Now, if I set \"ctrl.parent.q_details.client_location\" it is bind wit

5条回答
  •  不知归路
    2021-01-31 14:41

    HTML

    
    
    
    

    Js

        function _showSiebelDialog(event,_dataToPass) {
    
            $mdDialog.show({
                    locals:{dataToPass: _dataToPass}, //here where we pass our data
                    controller: _DialogController,
                    controllerAs: 'vd',
                    templateUrl: 'contentComponents/prepare/views/Dialog.tmpl.html',
                    parent: angular.element(document.body),
                    targetEvent: event,
                    clickOutsideToClose: true
    
                })
                .then(
                    function(answer) {},
                    function() {
    
                    }
                );
        };
    
    function _DialogController($scope, $mdDialog,dataToPass) {
    console.log('>>>>>>> '+dataToPass);
    }
    

提交回复
热议问题