I have to run code for creation of lists in SharePoint site (Host-web) when my SharePoint Hosted app is installing. I have 3 to 4 App-parts in my App.
Where should I write JavaScript code which will run when my app is installing.
I have to run code for creation of lists in SharePoint site (Host-web) when my SharePoint Hosted app is installing. I have 3 to 4 App-parts in my App.
Where should I write JavaScript code which will run when my app is installing.
Create your script file and give reference of the file on first page which will load while installing your app. The reference should be like this
<script src="../Scripts/yourScript.js" type="text/javascript"></script>