Himmators
Himmators

Reputation: 15006

Escaping characters in attributes in angular?

I'm using angular to post to a webform. Using ng-model I need to build an array with values that have dots in them.

I would like something like

<input type="text" ng-model="quiz.entry.958924423" name="entry.958924423" required />

would correspond to an object like this:

$scope.quiz= {'entry.958924423': '1F9trPeu9DA4W0CjADN4a1fl3Jh682ZPF8remWB21RhI'};

now it makes

$scope.quiz.entry = 1F9trPeu9DA4W0CjADN4a1fl3Jh682ZPF8remWB21RhI

Upvotes: 1

Views: 471

Answers (1)

DimaOverflow
DimaOverflow

Reputation: 1543

Try this method, if I understand you correctly:

<input type="text" ng-model="quiz['entry.958924423']" required />

Upvotes: 1

Related Questions