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')
|
script(type='text/javascript', src='/js/filters.js')
|
||||||
|
|
||||||
//Application Services
|
//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/global.js')
|
||||||
script(type='text/javascript', src='/js/services/index.js')
|
script(type='text/javascript', src='/js/services/index.js')
|
||||||
|
|
||||||
//Application Controllers
|
//Application Controllers
|
||||||
script(type='text/javascript', src='/js/controllers/index.js')
|
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/header.js')
|
||||||
|
script(type='text/javascript', src='/js/controllers/blocks.js')
|
||||||
script(type='text/javascript', src='/js/init.js')
|
script(type='text/javascript', src='/js/init.js')
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
'use strict';
|
'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.system', []);
|
||||||
angular.module('mystery.index', []);
|
angular.module('mystery.index', []);
|
||||||
|
angular.module('mystery.blocks', []);
|
||||||
|
|||||||
8
public/js/controllers/blocks.js
Normal file
8
public/js/controllers/blocks.js
Normal file
@ -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;
|
||||||
|
}]);
|
||||||
5
public/js/services/blocks.js
Normal file
5
public/js/services/blocks.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
angular.module('mystery.blocks').factory('Blocks', ['$resource', function($resource) {
|
||||||
|
return $resource;
|
||||||
|
}]);
|
||||||
Loading…
Reference in New Issue
Block a user