FrontEnd Expert
FrontEnd Expert

Reputation: 5803

how to pass array argument or parameter from template in angular

I have a directive customValidationVariance for validation input fields.

I want to pass wdaServiceModel.to3 , wdaServiceModel.to2 arguments as a array or object but I am unable to pass it..

I tried :

custom-validation-variance="{{wdaServiceModel.to3}} {{wdaServiceModel.to2}} "

I am checking the attr value in my directive like this :

var comparisonModel = $attrs.customValidationVariance;

Upvotes: 0

Views: 357

Answers (1)

vagsa
vagsa

Reputation: 46

Try this:

custom-validation-variance="{{[wdaServiceModel.to3,wdaServiceModel.to2]}} "

Upvotes: 0

Related Questions