removed useless division between core/ and main/

This commit is contained in:
Gwenhael Le Moine 2014-10-01 13:57:43 +02:00
parent b3a947a139
commit a8fd3f94b7
14 changed files with 33 additions and 62 deletions

View file

@ -54,19 +54,10 @@
<!-- APP -->
<script src="/js/app.js"></script>
<script src="/js/core/services/VersionService.js"></script>
<script src="/js/core/filters/VersionFilter.js"></script>
<script src="/js/core/directives/VersionDirective.js"></script>
<!-- CORE -->
<script src="/js/core/state.js"></script>
<script src="/js/core/controllers/AppCtrl.js"></script>
<script src="/js/core/controllers/NavbarCtrl.js"></script>
<!-- MAIN -->
<script src="/js/main/state.js"></script>
<script src="/js/main/controllers/BalanceCtrl.js"></script>
<script src="/js/state.js"></script>
<script src="/js/controllers/AppCtrl.js"></script>
<script src="/js/controllers/NavbarCtrl.js"></script>
<script src="/js/controllers/BalanceCtrl.js"></script>
</body>
</html>

View file

@ -1,5 +0,0 @@
app.directive('appVersion', ['version', function(version) {
return function(scope, elm, attrs) {
elm.text(version);
};
}]);

View file

@ -1,5 +0,0 @@
app.filter('interpolate', ['version', function(version) {
return function(text) {
return String(text).replace(/\%VERSION\%/mg, version);
};
}]);

View file

@ -1 +0,0 @@
app.value('version', '0.1');

View file

@ -1,27 +0,0 @@
// Application Level State
app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.when('', '/balance');
$stateProvider
.state('app', {
url: '',
controller: 'AppCtrl',
views: {
'navbar': {
templateUrl: 'js/core/templates/navbar.tpl.html',
controller: 'NavbarCtrl'
},
'main': {
templateUrl: 'js/core/templates/main.tpl.html'
}
}
})
.state('404', {
url: '/404',
templateUrl: 'js/core/templates/404.tpl.html',
controller: 'AppCtrl'
});
}]);

View file

@ -1,11 +0,0 @@
// Sub-application/main Level State
app.config(['$stateProvider', function($stateProvider) {
$stateProvider
.state('app.balance', {
url: '/balance',
templateUrl: 'js/main/templates/balance.tpl.html',
controller: 'BalanceCtrl'
});
}]);

29
public/app/js/state.js Normal file
View file

@ -0,0 +1,29 @@
// Sub-application/main Level State
app.config(['$stateProvider', function($stateProvider) {
$stateProvider
.state('app.balance', {
url: '/balance',
templateUrl: 'js/templates/balance.tpl.html',
controller: 'BalanceCtrl'
})
.state('app', {
url: '',
controller: 'AppCtrl',
views: {
'navbar': {
templateUrl: 'js/templates/navbar.tpl.html',
controller: 'NavbarCtrl'
},
'main': {
templateUrl: 'js/templates/main.tpl.html'
}
}
})
.state('404', {
url: '/404',
templateUrl: 'js/templates/404.tpl.html',
controller: 'AppCtrl'
});
}]);