문제

I am using JSLink feature of SharePoint 2013, My JSLink file has code to get current user id and other details, for this I need to add reference of jQuery file.

I tried adding those files in in JSLink on edit page web part section separated by semicolon, but that didn't work.

In short, I need way where in I can reference the library files for JSLink code similar to script tag in html file.

도움이 되었습니까?

해결책

Instead of adding script tags for other JavaScript files in your code, you can set JavaScript files in JS Link propery by | separated. Please see below example:

JSLink="~sitecollection/_catalogs/masterpage/jQuery.js|~sitecollection/_catalogs/masterpage/my-custom-field.js"

Here, it will first load jQuery.js and then my-custom-field.js in page.

Hope this will help you!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top