I am trying to set the ngModel from my custom component, but I am receiving an error message. I need to add the support to Two Way DataBind on this component.
I tried to use this tutorial:
https://thiagomelin.com.br/2017/08/09/angular-2-criando-um-custom-component-com-ngmodel/
The loop code (The collection.bookmark is an empty array in this test)
<div *ngFor="let b of collection.bookmark">
<app-telephonist-control [(ngModel)]="b"></app-telephonist-control>
<pre>{{ b | json}}</pre>
</div>
Run Code Online (Sandbox Code Playgroud)
The code of component
import { Component, OnInit, Input, Output, EventEmitter, forwardRef } from '@angular/core';
import { NG_VALUE_ACCESSOR, …Run Code Online (Sandbox Code Playgroud)