Looking at the first line of the modal controller, it appears the array that is the second parameter is missing "value",
as the third item in the array (just before the final function in the array). It should be:
.controller("TextEntryModalCtrl", ["$scope", "$modalInstance", "value", function ($scope, $modalInstance, value) {
This particular bit of syntax is using the controller()
method to add a constructor function to the TextEntryModalCtrl
controller using Angular's inline injection annotation to explicitly specify both the dependencies of your controller along with the constructor function that will ultimately consume those (injected) dependencies.
Though your constructor function was written to consume 3 dependencies, you had only explicitly listed the first 2 dependencies so the value
dependency was lost.
https://docs.angularjs.org/guide/controller#setting-up-the-initial-state-of-a-scope-object https://docs.angularjs.org/guide/di#inline-array-annotation