123456789101112131415161718192021222324252627282930313233343536 |
- /**
- * Created by robin on 12/15/16.
- */
-
- (function () {
- 'use strict';
-
- angular.module('appSdk')
- .factory('AppUtilsBusiness', ['$rootScope', function($rootScope) {
-
- var AppUtilsBusiness = {};
-
- AppUtilsBusiness.convertOrderBy = function(orderBy)
- {
- if (orderBy[0] == '-') {
- orderBy = orderBy.substr(1) + ":DESC";
- }
- else {
- orderBy = orderBy + ":ASC";
- }
- return orderBy;
- };
-
- AppUtilsBusiness.setTitle = function(title)
- {
- $rootScope.title = title + ' - MyApp';
- };
-
- AppUtilsBusiness.setToolbarTitle = function(title)
- {
- $rootScope.$emit('toolbar.title', {title: title});
- };
-
- return AppUtilsBusiness;
- }]);
- })();
|