stalno u pokretu

< IT & tech


29. 11. 2014. dev tool

restmod

  .config(function (restmodProvider, SERVER_BASE_URL) {
    restmodProvider.rebase({
      $config: {
        urlPrefix: SERVER_BASE_URL
      }
    }, 'setHeaders', 'DefaultPacker', 'AMSApi', 'DirtyModel');
  })

  .factory('setHeaders', function (restmod, authentication) {
    var headers;
    if (authentication.isAuthenticated()) {
      var currentUser = authentication.currentUser;
      headers = {
        'Content-Type': 'application/json',
        'Accept': 'application/json',
        'X-User-Email': currentUser.email,
        'X-User-Token': currentUser.authToken
      };
    } else {
      headers = {
        'Content-Type': 'application/json',
        'Accept': 'application/json'
      };
    }

    return restmod.mixin({
      $hooks: {
        'before-request': function (_req) {
          _req.headers = headers;
        }
      }
    });
  })

angular.module('resources.users', [])

  .factory('Users', function (restmod) {
    return restmod.model('/users');
  });

angular.module('species', []).factory('Species', function (restmod) {
  return restmod.model('/species');
});

          users: function (Users) {
            return Users.$collection().$fetch().$asPromise().then(function (users) {
              return users;
            });
          }

        users.$refresh(attrs).$asPromise().then(function (sp) {
          that.tableParams.meta = sp.$metadata.users;
        });

Related posts


07. 08. 2014. dev tool
rvm

notes
[ reading time: ~ 1 min. ]

21. 08. 2014. dev tool
Intellij IDEA

notes
[ reading time: ~ 1 min. ]

07. 10. 2014. dev tool
git notes

notes
[ reading time: ~ 1 min. ]

15. 10. 2014. dev tool
Oh my zsh

instalation, configuration, tab completion, history, plugins...
[ reading time: ~ 1 min. ]

15. 10. 2014. dev tool
yeoman, bower, grunt

notes
[ reading time: ~ 1 min. ]

Ovaj sajt ne sadrži first party kukije i druge mehanizme za aktivno praćenje poseta/ponašanja (facebook, google analytics, itd...). Na nekim stranicama se nalaze embedovani youtube video klipovi i google mape koji učitavaju svoje kukije.