Skip to content

Instantly share code, notes, and snippets.

@AntonTyutin
Last active August 29, 2015 14:05
Show Gist options
  • Save AntonTyutin/4219c1e669c74e8f5348 to your computer and use it in GitHub Desktop.
Save AntonTyutin/4219c1e669c74e8f5348 to your computer and use it in GitHub Desktop.
define(['lodash'], function (_) {
'use strict';
return {
resolve: {
departmentResource: ['resourceManager', function (resources) {
return resources.getResource('department');
}],
department: ['departmentResource', '$stateParams', function (resource, $stateParams) {
return resource.read({id: $stateParams.id}).$promise;
}]
},
controller: [
'$scope', '$state', 'FormErrorsProcessor', 'notifier', 'department',
function ($scope, $state, FormErrorsProcessor, notifier, department) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment