matthewyarlett / AngularJS-Directive-for-SharePoint-People-Picker

An AngularJS directive that wraps up the Microsoft Client-side people picker
http://matthewyarlett.blogspot.com/2015/04/using-microsoft-client-side-people.html
9 stars 12 forks source link

Calls to ensureuser fail with 404 due to incorrect web url in SharePoint Hosted App #2

Open colinrippey opened 9 years ago

colinrippey commented 9 years ago

Line 233:

                    currentWebUrl = clientCtx.get_url();

In a SharePoint Hosted App the above line sets currentWebUrl to a url of the app web suffixed with /app this causes a 404 when the call to ensureuser is subsequently called.

matthewyarlett commented 8 years ago

Thanks Colin,

The directive has a weburl attributes, but I haven't tested it thoroughly - and because of the order in which directives and models are initiated/populated, I have a feeling it won't work unless hard-code in the HTML.

Going to work on fixing this bug this week ;-)

matthewyarlett commented 8 years ago

Hey Colin, I just updated the directive to watch the pp-web-url attribute. You can add that attribute to the people picker markup, and assign a web URL for a different web to it.