Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions stephen_schroeder/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/node_modules/*
**/vendor/*
**/*.min.js
**/build/*
**/test/*_bundle*
*.md
package.json
45 changes: 45 additions & 0 deletions stephen_schroeder/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"rules": {
"no-console": 0,
"indent": [
2,
2,
{
"SwitchCase": 1
}
],
"quotes": [
2,
"single"
],
"linebreak-style": [
2,
"unix"
],
"semi": [
2,
"always"
]
},
"env": {
"es6": true,
"node": true,
"browser": true,
"mocha": true,
"jasmine": true
},
"globals": {
"describe": false,
"it": false,
"beforeEach": false,
"afterEach": false,
"before": false,
"after": false
},
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true,
"impliedStrict": true
},
"extends": "eslint:recommended"
}
104 changes: 104 additions & 0 deletions stephen_schroeder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

# Created by https://www.gitignore.io/api/node,osx,windows,vim

### Node ###
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history


### OSX ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk


### Vim ###
# swap
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags
12 changes: 12 additions & 0 deletions stephen_schroeder/app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Error Handling</title>
</head>
<body ng-controller="ErrController as ctrl">

<script src="bundle.js">
</script>
</body>
</html>
6 changes: 6 additions & 0 deletions stephen_schroeder/app/js/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const angular = require('angular');

const ErrApp = angular.module('ErrApp', []);

require('./services')(ErrApp);
require('./controllers')(ErrApp);
15 changes: 15 additions & 0 deletions stephen_schroeder/app/js/controllers/error_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = function(app) {
app.controller('ErrController', function(ErrService) {
this.printErr = ErrService.getError();
});
};

// module.exports = function(app) {
// app.controller('ErrApp', ['$sope', function() {
// this.title = 'Top Dog';
// this.year = 1972;
// this.entry = function() {
// return this.title + 'kickin\' ass since ' + this.year;
// };
// }]);
// };
3 changes: 3 additions & 0 deletions stephen_schroeder/app/js/controllers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = function(app) {
require('./error_controller')(app);
};
17 changes: 17 additions & 0 deletions stephen_schroeder/app/js/services/error_service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = function(app) {
app.factory('ErrService', function() {
const service = {};
const error = [];

service.printErr = function(msg) {
return function(err) {
error.push(msg);
console.log(err);
};
};
service.getError = function() {
return error;
};
return service;
});
};
3 changes: 3 additions & 0 deletions stephen_schroeder/app/js/services/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = function(app) {
require('./error_service')(app);
};
Loading