Skip to content

Commit

Permalink
Add a simple angular controller and include it as a requirement in th…
Browse files Browse the repository at this point in the history
…e main module.
  • Loading branch information
Josh Graber committed Oct 16, 2015
1 parent a790d0d commit 8b7e3c1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/app.js
Expand Up @@ -2,6 +2,10 @@

var angular = require('angular');

var helloWorldModule = require('./helloWorld/helloWorld.controller');

exports.moduleName = 'exp-ang';

angular.module(exports.moduleName, []);
angular.module(exports.moduleName, [
helloWorldModule.moduleName,
]);
14 changes: 14 additions & 0 deletions js/helloWorld/helloWorld.controller.js
@@ -0,0 +1,14 @@
'use strict';

var angular = require('angular');

exports.moduleName = 'exp-ang.helloWorld';
exports.controllerName = 'HelloWorldController';

function HelloWorldController() {
var self = this;
self.message = 'Hello Angular explorers!';
}

angular.module(exports.moduleName, [])
.controller(exports.controllerName, HelloWorldController);

0 comments on commit 8b7e3c1

Please sign in to comment.