diff --git a/app/css/app.css b/app/app.css
similarity index 100%
rename from app/css/app.css
rename to app/app.css
diff --git a/app/app.js b/app/app.js
new file mode 100644
index 0000000000..21eccdb8ea
--- /dev/null
+++ b/app/app.js
@@ -0,0 +1,12 @@
+'use strict';
+
+// Declare app level module which depends on views, and components
+angular.module('myApp', [
+ 'ngRoute',
+ 'myApp.view1',
+ 'myApp.view2',
+ 'myApp.version'
+]).
+config(['$routeProvider', function($routeProvider) {
+ $routeProvider.otherwise({redirectTo: '/view1'});
+}]);
diff --git a/app/js/directives.js b/app/components/version/version-directive.js
similarity index 72%
rename from app/js/directives.js
rename to app/components/version/version-directive.js
index 9fc16cc4cb..62b8f76ac9 100644
--- a/app/js/directives.js
+++ b/app/components/version/version-directive.js
@@ -1,9 +1,6 @@
'use strict';
-/* Directives */
-
-
-angular.module('myApp.directives', []).
+angular.module('myApp.version').
directive('appVersion', ['version', function(version) {
return function(scope, elm, attrs) {
elm.text(version);
diff --git a/test/unit/directivesSpec.js b/app/components/version/version-directive_test.js
similarity index 76%
rename from test/unit/directivesSpec.js
rename to app/components/version/version-directive_test.js
index 6061842969..b38fbba5d2 100644
--- a/test/unit/directivesSpec.js
+++ b/app/components/version/version-directive_test.js
@@ -1,9 +1,7 @@
'use strict';
-/* jasmine specs for directives go here */
-
-describe('directives', function() {
- beforeEach(module('myApp.directives'));
+describe('version directives', function() {
+ beforeEach(module('myApp.version'));
describe('app-version', function() {
it('should print current version', function() {
diff --git a/app/js/filters.js b/app/components/version/version-filter.js
similarity index 76%
rename from app/js/filters.js
rename to app/components/version/version-filter.js
index 901730e63b..71c8bbcba2 100644
--- a/app/js/filters.js
+++ b/app/components/version/version-filter.js
@@ -1,8 +1,6 @@
'use strict';
-/* Filters */
-
-angular.module('myApp.filters', []).
+angular.module('myApp.version').
filter('interpolate', ['version', function(version) {
return function(text) {
return String(text).replace(/\%VERSION\%/mg, version);
diff --git a/test/unit/filtersSpec.js b/app/components/version/version-filter_test.js
similarity index 74%
rename from test/unit/filtersSpec.js
rename to app/components/version/version-filter_test.js
index 19af3293a1..e25bd880df 100644
--- a/test/unit/filtersSpec.js
+++ b/app/components/version/version-filter_test.js
@@ -1,17 +1,13 @@
'use strict';
-/* jasmine specs for filters go here */
-
-describe('filter', function() {
- beforeEach(module('myApp.filters'));
-
+describe('version filter', function() {
+ beforeEach(module('myApp.version'));
describe('interpolate', function() {
beforeEach(module(function($provide) {
$provide.value('version', 'TEST_VER');
}));
-
it('should replace VERSION', inject(function(interpolateFilter) {
expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after');
}));
diff --git a/app/components/version/version.js b/app/components/version/version.js
new file mode 100644
index 0000000000..ecca360566
--- /dev/null
+++ b/app/components/version/version.js
@@ -0,0 +1,4 @@
+'use strict';
+
+angular.module('myApp.version', []).
+ value('version', '0.1');
diff --git a/test/unit/servicesSpec.js b/app/components/version/version_test.js
similarity index 60%
rename from test/unit/servicesSpec.js
rename to app/components/version/version_test.js
index 3864c8d9bb..c6d99e3a7e 100644
--- a/test/unit/servicesSpec.js
+++ b/app/components/version/version_test.js
@@ -1,10 +1,7 @@
'use strict';
-/* jasmine specs for services go here */
-
-describe('service', function() {
- beforeEach(module('myApp.services'));
-
+describe('version service', function() {
+ beforeEach(module('myApp.version'));
describe('version', function() {
it('should return current version', inject(function(version) {
diff --git a/app/css/.gitkeep b/app/css/.gitkeep
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/app/img/.gitkeep b/app/img/.gitkeep
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/app/index.html b/app/index.html
index ae7e943cd9..7eb1d6e804 100644
--- a/app/index.html
+++ b/app/index.html
@@ -33,10 +33,11 @@
-->
-
-
-
-
-
+
+
+
+
+
+