2

textAngular プラグインを使用すると、新しく設定された変数を DOM に適用できません。Angular ブートストラップ UI モーダルを実装しています。変数が正しく設定されていることがわかり、問題はeditorScope.updateTaBindtaTextElement().

onElementSelectブロック内の私のコードは次のとおりです。

reLinkButton.on('click', function(event){
   event.preventDefault();

   var modalInstance = $modal.open({
      templateUrl : '/templates/dialog/linkMaker.html',
      controller  : 'linkMakerDlgCtrl',
      resolve     : {
         // variables here ...
         }
      }
   });
   modalInstance.result.then(function (link) {

     $element.attr('href', 'http://' + link.ref); // <== a console.log of this returns the correct value
     editorScope.updateTaBindtaTextElement(); // <== new value not applied to DOM

   }, function () { $log.debug('Modal dismissed'); });

   editorScope.hidePopover();
});

注として、これは、ブロックに関する同様の問題と、解決策が aとを追加する場所に関する以前の質問に続きます。私はそれを試しましたが、私の問題は解決しませんでした。actionpromisereturn false

4

1 に答える 1

0

textAngular のバージョンを 1.2.2 から 1.4.3 に更新することで解決しました。

于 2015-08-03T18:33:14.000 に答える