I'm trying to follow this answer to an older question, but I'm getting a crash on $parse as the function parameter. Why might it not recognize $parse?
https://stackoverflow.com/a/29571230/1481314
.directive('elementReady', function ($parse) {
            return {
                restrict: 'A',
                link: function ($scope, elem, attrs) {
                    elem.ready(function () {
                        $scope.$apply(function () {
                            var func = $parse(attrs.elementReady);
                            func($scope);
                        })
                    })
                }
            }
        });
 
     
    