We are currently developing a dynamic form system where users can create custom questions in the admin panel and set conditions to display them based on the values of other questions.
ng-show="((UserCode==10003 && Name=='Ankur') ||(StateId=='NY'))"
This functionality works well for showing/hiding questions based on other question values. However, the conditions are dynamically created at runtime based on user-selected values in the database. How can we add dynamic ng-show conditions?
I attempted the following:
$scope.Condition = "((UserCode==10003 && Name=='Ankur') ||(StateId=='NY'))";
and ng-show="{{Condition}}"
, but this approach did not work.
UserId, Name, and StateId are examples of other questions on the page.
Please advise if any additional information is needed.
Thank you.