問題タブ [eventsetter]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
angular - 入力が変更されたときにAngularセッターを使用する方法は?
と の 2 つのコンポーネントがParent Component
ありChild component
、 で実行される API がParent component
あり、応答値が に渡されますchild component
。現在使用していますが、代わりngOnChanges
に使用方法を知りたいです。Setters
ParentComponent
私は以下のコードを持っていると仮定します:
そして、ChildComponent
私はこれを持っています:
apiResponse
変更されるたびにngOnChanges
関数が起動し、コンソールに値が出力されます。
結果を達成したいが、 if を使用する場合Setters
。ngOnChanges
他のシナリオと同様に、複数の入力がある可能性があり、入力の値が変更されるたびに解雇されたくありません。
wpf - AttachedCommandBehavior を使用して複数のイベントをセッター スタイルにバインドする方法は?
複数のコマンドを xamdatapresenter のレコードにバインドする必要があります。
しかし、プロジェクトの実行中にエラーが発生しました:
ArgumentNullException: 値を null にすることはできません。パラメータ名: プロパティ
プロパティlocalCommand:CommandBehaviorCollection.Behaviors
が null であることを確認します。私は何か見落としてますか?誰にもアイデアはありますか?