Is there a way to update an array linked to my ng-model after clicking a button without having to bind them? The issue arises because the data is being selected from a list. I want the data to be updated as soon as the button is clicked, without needing to change views or refresh the page.
Below is my HTML code, showing where the ng-model text should be updated:
'<span>HVACs: <ct-input disabled="true" ng-model="data.groupLimits[activeIndex].devices" </ct-input> </span>' + '<br>' +
'<span> Add/Remove Device: <ct-input-list list="hvacsList" ng-model="model" </ct-input-list>' + '</span>' +
+ '<ct-button text="Add Device" show="true" ng-click="addDevice()"> </ct-button>'