If someone encounters a problem like this: Lexer error: Unexpected next character in columns 7-7 [#] in the expression [consts. # Contact]
Through:
Controller:
app.controller('XXController', function($rootScope, $scope, $q, XXService, configuration, constants) { $scope.consts = constants.constants; //... });
constants_en.json:
{ "#Contact":"Contact Details", ... }
HTML:
<label for="contact">{{ consts.#Contact }} </label>
Solution: Use the following code in HTML:
<label for="customer">{{ consts['#Contact'] }}</label>
Akansha Srivastava
source share