While attempting to access my angular scope, I keep encountering the common issue of "$digest already in progress". I am unable to use $timeout as a solution because I need to perform this task within the script section of my html due to Kendo UI Grid requirements. Unfortunately, I have to initialize the grid in the html script section, and I wish I could find a way to handle it all within my controller.
Despite the simplicity of the code, I am at a loss for what to try next.
....
$(document).ready(function () {
var scope = $('[ng-controller="NewIncidentController"]').scope();
scope.$apply(function () {
scope.submitfailure = true;
});
});
Thank you.