dataSortingQrySpec(sortBy, descending) {
          let spec = { order: [] };
          if (sortBy) spec.order.push(`${sortBy} ${descending ? 'DESC' : 'ASC'}`);

          // It's actually a good idea to include ID (primary key) as the last sort order column to make the ordering predictable when, for example,
          // customers have the same last name
          spec.order.push(`${ctx.app.$model.primaryKeyPropertyKey} ASC`);

          return spec;
        }
/**
         * Given the sortBy property key and the descending flag return the LoopBack query spec object for sorting data during retrieval
         * @param {string} sortBy Property key by which to sort
         * @param {boolean} descending True for descending order, false for ascending
         * @returns LoopBack query spec for sorting
         */
Given the sortBy property key and the descending flag return the LoopBack query spec object for sorting data during retrieval
@param {string} sortBy Property key by which to sort
@param {boolean} descending True for descending order, false for ascending
@returns LoopBack query spec for sorting
Given the sortBy property key and the descending flag return the LoopBack query spec object for sorting data during retrieval @param { string } sortBy Property key by which to sort @param { boolean } descending True for descending order false for ascending @returns LoopBack query spec for sorting
dataSortingQrySpec(sortBy, descending) {
          let spec = { order: [] };
          if (sortBy) spec.order.push(`${sortBy} ${descending ? 'DESC' : 'ASC'}`);
          spec.order.push(`${ctx.app.$model.primaryKeyPropertyKey} ASC`);
          return spec;
        }
dataSortingQrySpec ( sortBy , descending ) { let spec = { order : [ ] } ; if ( sortBy ) spec . order . push ( ` ${ sortBy } ${ descending ? 'DESC' : 'ASC' } ` ) ; spec . order . push ( ` ${ ctx . app . $model . primaryKeyPropertyKey } ` ) ; return spec ; }
Given the sortBy property key and the descending flag return the LoopBack query spec object for sorting data during retrieval
 @param {string} sortBy Property key by which to sort
 @param {boolean} descending True for descending order, false for ascending
 @returns LoopBack query spec for sorting
Given the sortBy property key and the descending flag return the LoopBack query spec object for sorting data during retrieval @param { string } sortBy Property key by which to sort @param { boolean } descending True for descending order false for ascending @returns LoopBack query spec for sorting
// It's actually a good idea to include ID (primary key) as the last sort order column to make the ordering predictable when, for example, // customers have the same last name