I have made a function
user to the
$scope of the pages controller.
$scope.user = user; $scope.getAge = getAge;
Make sure you're doing this in the controller and setting up the controller correctly. It won't work unless you've set up a controller with this DOM view and injected the
$scope service into the controller.