Passing data to mdDialog

前端 未结 5 1596
盖世英雄少女心
盖世英雄少女心 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:27

    This worked for me:

            confirmNewData = function() {
            let self = this;
            this.$mdDialog.show({                
                templateUrl: '/dist/views/app/dialogConfirmAFEData.html',
                controllerAs: "ctrl",                                
                controller: $scope => $scope = { $mdDialog: self.$mdDialog, 
                                                 data: self.FMEData, 
                                                 cancel: function() { this.$mdDialog.cancel(); }, 
                                                 confirm: function() { this.$mdDialog.hide(); }  
                                               },
                clickOutsideToClose: false
            }).then(function() {
                // User Accepted!!
                console.log('You accepted!!!');
            }, function() {
                // User cancelled, don't do anything.
                console.log('You cancelled!!!');
            });
        };
    

    And in the view...

    
        
          

    GIS Data...

  • Lease: {{ ctrl.data.LEASE }}
  • Reservoir: {{ ctrl.data.RESERVOIR }}
  • Cancel Yes

提交回复
热议问题