Skip to content

Commit

Permalink
Added aboutDevelopers route
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoy committed Oct 19, 2015
1 parent 5ee1eab commit f79a90a
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<script src="scripts/controllers/header.js"></script>
<script src="scripts/controllers/projects.js"></script>
<script src="scripts/controllers/contact.js"></script>
<script src="scripts/controllers/aboutdevelopers.js"></script>
<!-- endbuild -->
</body>
</html>
5 changes: 5 additions & 0 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ angular
templateUrl: 'views/contact.html',
controller: 'ContactCtrl'
})
.when('/about/developers', {
templateUrl: 'views/aboutdevelopers.html',
controller: 'AboutdevelopersCtrl',
controllerAs: 'aboutDevelopers'
})
.otherwise({
redirectTo: '/'
});
Expand Down
17 changes: 17 additions & 0 deletions app/scripts/controllers/aboutdevelopers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

/**
* @ngdoc function
* @name kondeoHomeApp.controller:AboutdevelopersCtrl
* @description
* # AboutdevelopersCtrl
* Controller of the kondeoHomeApp
*/
angular.module('kondeoHomeApp')
.controller('AboutdevelopersCtrl', function () {
this.awesomeThings = [
'HTML5 Boilerplate',
'AngularJS',
'Karma'
];
});
1 change: 1 addition & 0 deletions app/views/aboutdevelopers.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>This is the aboutDevelopers view.</p>
23 changes: 23 additions & 0 deletions test/spec/controllers/aboutdevelopers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

describe('Controller: AboutdevelopersCtrl', function () {

// load the controller's module
beforeEach(module('kondeoHomeApp'));

var AboutdevelopersCtrl,
scope;

// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
AboutdevelopersCtrl = $controller('AboutdevelopersCtrl', {
$scope: scope
// place here mocked dependencies
});
}));

it('should attach a list of awesomeThings to the scope', function () {
expect(AboutdevelopersCtrl.awesomeThings.length).toBe(3);
});
});

0 comments on commit f79a90a

Please sign in to comment.