1

ディレクティブの属性を '='演算子でバインドした場合のみ、それ自体は正常に動作する分離スコープのカスタム・ディレクティブがあります。 2ウェイバインド。 1ウェイバインディング( '<')に変更しようとすると、このエラーが発生します。 ?AngularJSディレクティブは2ウェイ・バインディング・タイプのみを認識します

angular.module('directive.module', ['directive.dependency']) 
.directive('directiveName', function(){ 
    return { 
     restrict: 'E', 
     scope: { 
      'attr1': '=info', 
      'create': '<', 
      'attr3': '<', 
      'attr4': '=', 
      'attr5': '<' 
     }, 
     templateUrl: 'template.html', 
     replace: true, 
     controller: function($scope, $element, $attrs, $transclude, ...){ 
      //controller code`enter code here` 
     } 
}}); 

また、アイム:https://docs.angularjs.org/error/ $コンパイル/ ISCP P0 = xflWorkout & P1 =作成& P2 =%3C & P3 = 20scope%がここ20definition

は私の指示の一例である%を隔離角度1.4.2を使用します。

私のアプリは正常に動作しますが、なぜこのように動作するのかを知りたいのですが、何か助けてくれてありがとうございます! :)

答えて

関連する問題