I am trying to saving some value in the Web part properties. I know in Spfx you can save or update any value in webpart property like
this.properties.myProp = "newValue";
I am using angular with sharepoint framework and want to access to value of the webpart property in the angular app.js file
I can access webpart property in the render method using this.properties;
In my render method I have something like this.
this.domElement.innerHTML = `<div ng-include="'settings/core/test.html'"></div>`;
this.initializePromise
.then(() =>{
//bootstrap element
// further code
My application code is in app.js and I want to access and modify the webpart properties in that file.
I tried storing the value of webpart properties in a global variable and accessing it but for same multiple webparts it causes problem, because of global scope both webpart properties are assigned same value.
How can I pass the scope of my render method to the app.js file so webpart properties are accessible in that file or simply how can I access the webpart properties in the angular app?