My dilemma is that I am attempting to execute my reloadPage()
function within the context of my ng-change=saveCurrentTemplate
, but it does not seem to be functioning properly:
$scope.reloadPage = () ->
getControllerScope "Ctrl", (scope) ->
$scope.bb_main = ""
$scope.apply()
$scope.show_page
$scope.saveCurrentTemplate = () ->
$templateCache.put($scope.currentCache, $scope.templateContents)
$scope.reloadPage()
The goal here is for the content to update as changes are made in the textarea. However, I am encountering the following error message:
Object #<s> has no method 'apply'