Q: Angular/ngMessages - Parameterized messages I'm using  ngMessages ( Angular 1.47)  to display custom validation messages.  I have this working, along with my messages in a seperate HTML file that is brought in via ng-message-include.  
I want to validate that a field is within a range ( this is working) & then display a message with the range in it.  The range itself  comes from a DB & will vary depending upon what is selected.  Any pointers for setting this up?  I'm not sure where to put these values.  Also, I have a few fields I want to set up like this.
  <span ng-message="range"> Must be from {{from}} to {{to}}/>


A: You can use ng-message-exp for dynamic messages:
<div ng-message-exp="errorMessage.type">
  {{errorMessage.text}}
</div>

And create the dynamic message and it's triggers in your controller:
$scope.min = 5;
$scope.max = 20;
$scope.errorMessage = {type: ['minlength', 'maxlength'], 
                       text: 'please write ' + $scope.min + ' to ' + $scope.max + ' characters'};

Example plunker.
