I've implemented a new button that should be active when the page loads and then disabled when data is being saved (using a save button). Essentially, this new button should be inactive whenever the save button is active.
Angular code :
<input id="save" class="btn " type="button"
value="SAVE BUTTON" ng-click="saveData()" ng-disabled="isSaveButtonDisabled" />
<input id="create" class="btn " type="button"
value="NEW BUTTON" ng-click="createNewButton()" ng-disabled="isCreateButtonDisabled" />
In the controller, it is connected to the scope like this :
$scope.isSaveButtonDisabled= isSaveButtonDisabled;
$scope.isCreateButtonDisabled= isCreateButtonDisabled;
and there are two functions that determine the value of these attributes :
function isSaveButtonDisabled(){
$scope.isSaveButtonDisabled= true;
}
function isCreateButtonDisabled(){
$scope.isCreateButtonDisabled= false;
}
However, the Create Button always remains disabled. What could I possibly be overlooking?