title: How to write the setter for a property which is an array of objects and to be populated by the view, in Angular 2 (ts)
body: <p>Property: </p>
  
  <pre><code>private _secretQuestions: {question: number, answer: string}[];
  </code></pre>
  
  <p>I have three select boxes(question) in my html and for each select box, there is an input(answer) box. I want to bind the selected and input values to the property _secretQuestions. 
  As there are only three questions, I thought of initializing the array like this:</p>
  
  <pre><code>private _secretQuestions = [{question: 0, answer: ""}, {question: 0, answer: ""}, {question: 0, answer: ""}];
  </code></pre>
  
  <p>But I am just unable to write the setter for this property:</p>
  
  <pre><code>set secretQuestions(value: Array&lt;{question: number, answer: string}&gt;) {
      // what code here?
  }
  </code></pre>
  
  <p>In my html, </p>
  
  <pre><code>&lt;select class="form-control" [(ngModel)]="regModel.secretQuestions"&gt;
  ... &lt;/select&gt;
  </code></pre>
  
  <p>calls the setter, but if it was somehow possible to call the setter like:</p>
  
  <pre><code>&lt;select class="form-control" [(ngModel)]="regModel.secretQuestions[0].question"&gt;
  </code></pre>
  
  <p>I think I could have got my problem solved.</p>
  
  <p>Can you please suggest the right approach for this?</p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>The property _securityQuestions belongs to a Provider, and is injected into the component. The provider has to have the property as private.</p>