Skip to content

Instantly share code, notes, and snippets.

View thomasnordlund's full-sized avatar

Thomas Nordlund thomasnordlund

  • Minneapolis, MN
View GitHub Profile
@thomasnordlund
thomasnordlund / login.html
Created November 16, 2012 14:48 — forked from jzerbe/login.html
Spring Security login form with HTML5 boilerplate
<!doctype html>
<!--
/*
* Jason Zerbe
* Copyright 2012
* Build-Id: EMPTY
*
* any comments before doctype will set IE9 to quirks mode
*/
-->
@thomasnordlund
thomasnordlund / $resource.js
Created November 15, 2012 21:53
angular: $resource
/*
* Dependencies
*
* You must reference the angular-resource js script file.
* Then you must declare a module dependency on 'ngResource' via angular.module('myapp', ['ngResource']).
*/
// Parameters
$resource(url[, paramDefaults][, actions]);
@thomasnordlund
thomasnordlund / angular-calendar-module.js
Created November 12, 2012 22:18
Google Calendar API module for Angular.js
'use strict';
/* Google Calendar API Module */
angular.module('myApp.calendar', []).
value('resp', {
nullMethod: function() {
return 'value';
},
handleClientLoad: function() {
@thomasnordlund
thomasnordlund / authRoute.js
Created November 6, 2012 16:19 — forked from xcambar/LICENSE
Authenticated routing using AngularJS
authRouteProvider.$inject = ['$routeProvider'];
function authRouteProvider ($routeProvider) {
/**
* Creates a controller bound to the route, or wraps the controller in param
* so the authentication check is run before the original controller is executed
* @param currentController
* @return {Function} The wrapper controller
*/
function redirectCtrlFactory (currentController) {
_ctrl.$inject = ['currentUser__', 'userRole__', '$location'];