In my create form, I have successfully used a directive to capture and store values in SharePoint via REST. The directive I am using can be found at this link.
Within my HTML, I am implementing the directive like this:
<sp-people-picker name="CC" id="CC" ng-model="vm.cc" min-entries="1" max-entries="20" allow-duplicates="false" show-login="false" show-title="true" min-characters="2" app-web-url="$scope.spAppWebUrl" />
Now, I am facing an issue where I need the selected values from the create form to display in my update form. I have tried setting the scope as shown below, but it seems that the directive does not resolve the values unless they are manually typed into the form:
$scope.vm.cc = {
Email: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cfa2b6aaa2aea6a38faaa2aea6a3e1aca0a2">[email protected]</a>",
Login: "i:0#.f|membership|<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8ce1f5e9e1ede5e0cce1edeffee3ffe3eaf8a2e3feeb">[email protected]</a>",
Name: "Lastname, firstname"
}
Does anyone have any suggestions on how I can populate the values in my update form automatically on load? It seems like it may require some resolution of the stored values during the loading process.