Click here to Skip to main content
15,885,998 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friend,

in my application ,there is a ng-repeater like

<div ng-repeat="q in auditTemplate.AuditTemplateQuestion" class="QTable">


I needs to order by based on multiple property like AuditTemplateGroupId, AuditTemplateGroupSeqId

What I have tried:

I have tried like
<div ng-repeat="q in auditTemplate.AuditTemplateQuestion | orderBy:['AuditTemplateGroupId','AuditTemplateGroupSeqId']" class="QTable">


But show error on runtime.

Please help.
Posted
Updated 2-Mar-17 2:19am
v2
Comments
Andy Lanng 2-Mar-17 8:22am    
a few questions:
What was the error? What did it say?
Are you sure that auditTemplate.AuditTemplateQuestion is an array at the time the filter runs?
Thanks
Mukesh Ghosh 2-Mar-17 8:25am    
Error is

Uncaught Error: Syntax error, unrecognized expression: div[ng-repeat='q in auditTemplate.AuditTemplateQuestion orderBy:['AuditTemplateGroupId','AuditTemplateGroupSeqId']']
at Function.bc.error (browserLink:37)
a
Karthik_Mahalingam 2-Mar-17 22:35pm    
Always use  Reply  button, to post Comments/query to the user, so that the user gets notified and responds to your text.
Nathan Minier 2-Mar-17 9:50am    
Do you have a data sample for auditTemplate.AuditTemplateQuestion at runtime?
Mukesh Ghosh 3-Mar-17 4:26am    
Here it is

$hashKey
:
"object:55"
Active
:
true
AuditTemplateGroupId
:
13
AuditTemplateGroupName
:
"ddddd"
AuditTemplateGroupSeqId
:
1
AudittemplateQuestionAnswer
:
Array[2]
CustomQuestionId
:
"D1"
Description
:
"1"
MinSeq
:
1
Question
:
"1"
QuestionID
:
0
QuestionTypeId
:
0
SccId
:
0
Score
:
0
SequenceID
:
1
ShortDescription
:
"1"
Weight
:
1

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900