Frontend: Blocks controller for angularjs
This commit is contained in:
parent
c2bbdb2941
commit
1ec2984bab
|
@ -23,10 +23,12 @@ script(type='text/javascript', src='/js/directives.js')
|
|||
script(type='text/javascript', src='/js/filters.js')
|
||||
|
||||
//Application Services
|
||||
script(type='text/javascript', src='/js/services/blocks.js')
|
||||
script(type='text/javascript', src='/js/services/global.js')
|
||||
script(type='text/javascript', src='/js/services/index.js')
|
||||
|
||||
//Application Controllers
|
||||
script(type='text/javascript', src='/js/controllers/index.js')
|
||||
script(type='text/javascript', src='/js/controllers/header.js')
|
||||
script(type='text/javascript', src='/js/controllers/blocks.js')
|
||||
script(type='text/javascript', src='/js/init.js')
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('mystery', ['ngCookies', 'ngResource', 'ngRoute', 'ui.bootstrap', 'ui.route', 'mystery.system', 'mystery.index']);
|
||||
angular.module('mystery', ['ngCookies', 'ngResource', 'ngRoute', 'ui.bootstrap', 'ui.route', 'mystery.system', 'mystery.index', 'mystery.blocks']);
|
||||
|
||||
angular.module('mystery.system', []);
|
||||
angular.module('mystery.index', []);
|
||||
angular.module('mystery.blocks', []);
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('mystery.blocks').controller('BlocksController', ['$scope', '$routeParams', '$location', 'Global', 'Blocks', function ($scope, $routeParams, $location, Global, Blocks) {
|
||||
$scope.global = Global;
|
||||
|
||||
// for avoid warning. please remove when you use Blocks
|
||||
$scope.blocks = Blocks;
|
||||
}]);
|
|
@ -0,0 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('mystery.blocks').factory('Blocks', ['$resource', function($resource) {
|
||||
return $resource;
|
||||
}]);
|
Loading…
Reference in New Issue