Open AncientSwordRage opened 9 years ago
attributes: { mental: [ { name: intelligence, value: 1, order: 1 } ] }
should do it, if you use ng-repeat="attr in mentalattributes | orderBy:'order'".
On Tue, Mar 3, 2015 at 10:06 AM, AncientSwordRage notifications@github.com wrote:
[image: Incorrectly sorted attributes] https://camo.githubusercontent.com/7bda09b29bbd205b44fd62ae1d9359f7076bc8a3/687474703a2f2f692e737461636b2e696d6775722e636f6d2f584d6e59782e706e67
Attributes are unordered. Not sure how best to tell Angular how to order them:
e.g. {{ data| orderBy : ????}}
— Reply to this email directly or view it on GitHub https://github.com/AncientSwordRage/nWoD-db/issues/10.
@rozza2058 that works, but I need to specify in the backend somewhere about the order, before I create the JSON for Angular noms.
Yes, you would. That's your area. You don't have to order it if you don't want to - the front end can take care of the ordering to display it.
On Tue, Mar 3, 2015 at 11:09 AM, AncientSwordRage notifications@github.com wrote:
@rozza2058 https://github.com/rozza2058 that works, but I need to specify in the backend somewhere about the order, before I create the JSON for Angular noms.
— Reply to this email directly or view it on GitHub https://github.com/AncientSwordRage/nWoD-db/issues/10#issuecomment-76926686 .
@rozza2058 Yeah, That's my areas thus assigning it to my self :stuck_out_tongue_closed_eyes:.
How could this be handled by the front end without changing the JSON?
Common sense. We know what the order should be, so we find the attribute that matches the expected name.
On Tue, Mar 3, 2015 at 12:05 PM, AncientSwordRage notifications@github.com wrote:
@rozza2058 https://github.com/rozza2058 Yeah, That's my areas thus assigning it to my self [image: :stuck_out_tongue_closed_eyes:].
How could this be handled by the front end without changing the JSON?
— Reply to this email directly or view it on GitHub https://github.com/AncientSwordRage/nWoD-db/issues/10#issuecomment-76933632 .
Ah the old fashioned way. On 3 Mar 2015 12:14, "rozza2058" notifications@github.com wrote:
Common sense. We know what the order should be, so we find the attribute that matches the expected name.
On Tue, Mar 3, 2015 at 12:05 PM, AncientSwordRage < notifications@github.com> wrote:
@rozza2058 https://github.com/rozza2058 Yeah, That's my areas thus assigning it to my self [image: :stuck_out_tongue_closed_eyes:].
How could this be handled by the front end without changing the JSON?
— Reply to this email directly or view it on GitHub < https://github.com/AncientSwordRage/nWoD-db/issues/10#issuecomment-76933632
.
— Reply to this email directly or view it on GitHub https://github.com/AncientSwordRage/nWoD-db/issues/10#issuecomment-76934631 .
Attributes are unordered.
This is because the current attributes are as such:
JSON will need to be altered to state 'order' or type (Power/Fineese/Resistance).
Not sure how best to do so, and thus tell Angular how to order them:
e.g.
{{ data| orderBy : ????}}