How to pass parameters in angular-translate

It’ll probably be best if you translate inside the controller for this one, unless you want to pass element and minlength to the template.

Firstly you’ll need inject $translate into your controller. Then to generate your message:

this.errorMessage = $translate('MINLENGTH', { element: element, value: minlength });

This method is also outlined here.

To do this in the template (outlined here):

{{ MINLENGTH | translate : { element: element, value: minlength } }}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)