Templateurl according to object property

Asked

Viewed 22 times

1

Hello,

I have a controller with an array ($Scope.Fields) with several objects inside: each object is a different form input (e.g., input, select, checkboxes). I’m already using ng-repeat to iterate on them, but I need each one to load a different templateUrl according to the Type property of the object itself.

What is the ideal method to do this using Angular? (v1.5.7)

Thanks in advance!

1 answer

1


I think that’s what you want -> here

  • 1

    It’s exactly what I was looking for! Thank you :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.