AngularJS - Check checkboxes dynamically
<p>I am new to AngularJS. I am working on checkboxlist using WebApi and angularJS and need help. 
Well, there is a checkboxlist where user can select multiple options. I am able to write successful code for this. The selected options are saved into the database. But, on edit, I want those options selected already. How can I achieve this? 
Thanks.</p>

<p>Here is my checkboxlist:</p>

<pre><code>&lt;div ng-repeat="value in getCheckboxlist"&gt;
    &lt;input ichecklist type="checkbox" id="{{value.Id}}" value="{{value.Id}}"&gt;
    &lt;span&gt;{{value.Name}}&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p>Declaration of array:</p>

<pre><code>$scope.selection: [];
</code></pre>

<p>and this is how I am getting selected IDs from database on edit:</p>

<pre><code>$scope.selection: selectedValues;
</code></pre>

<p>where 'selectedValues' contains json of selected IDs.</p>