Skip to content

Instantly share code, notes, and snippets.

View christopherthielen's full-sized avatar

Chris Thielen christopherthielen

View GitHub Profile
@christopherthielen
christopherthielen / ct-ui-router-extras.js
Created August 15, 2014 16:42
Dev build of ct-ui-router-extras.js 2014-08-15 (will be 0.0.10)
/**
* UI-Router Extras
* @version v2014-08-15-dev
* @link http://christopherthielen.github.io/ui-router-extras/
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
(function (window, angular, undefined) {
angular.module("ct.ui.router.extras", [ 'ui.router' ]);
ctrl.cancel = function() { $state.go("^"); };
ctrl.send = function(message) {
Restangular.all("api/messages")
.post(message)
.then($scope.messages.refresh)
.then(function() { $state.go("^"); })
.catch(function(err) {
ctrl.errors.push(err);
}
);
@christopherthielen
christopherthielen / gist:b3fc0304b737a4bf8ec9
Last active August 29, 2015 14:06
Why was my issue tagged with StackOverflow and closed?

Why was my issue tagged with "StackOverflow" and closed?

Short answer

Please ask your question to the community at StackOverflow.

Long answer

This gist was linked from the UI-Router issue tracker. This issue tracker is reserved for feature requests and suspected UI-Router bugs.

@christopherthielen
christopherthielen / gist:99f1ffb873493c83bb26
Created September 15, 2014 17:21
angular-ui-router.min.js v0.2.12-dev-2014-09-15
/**
* State-based routing for AngularJS
* @version v0.2.12-dev-2014-09-15
* @link http://angular-ui.github.com/
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return J(new(J(function(){},{prototype:a})),b)}function e(a){return I(arguments,function(b){b!==a&&I(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var c=[];return b.forEach(a,function(a,b){c.push(b)}),c}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l].params&&(e=g(i[l].params)
@christopherthielen
christopherthielen / angular-ui-router.js
Last active August 29, 2015 14:06
ui-router 0.2.12-pre-2014-09-22
/**
* State-based routing for AngularJS
* @version v0.2.11-dev-2014-09-22
* @link http://angular-ui.github.com/
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
/* commonjs package manager support (eg componentjs) */
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
module.exports = 'ui.router';
@christopherthielen
christopherthielen / angular-ui-router.js
Created November 13, 2014 22:20
angular-ui-router.js 0.2.12 release candidate 1
/**
* State-based routing for AngularJS
* @version v0.2.12-dev-2014-11-13
* @link http://angular-ui.github.com/
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
/* commonjs package manager support (eg componentjs) */
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
module.exports = 'ui.router';
/**
* State-based routing for AngularJS
* @version v0.2.12-dev-2014-11-20
* @link http://angular-ui.github.com/
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
/* commonjs package manager support (eg componentjs) */
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
module.exports = 'ui.router';
@christopherthielen
christopherthielen / angular-ui-router.js
Created November 21, 2014 02:35
0.2.13-build2 - Release Candidate
/**
* State-based routing for AngularJS
* @version v0.2.12-dev-2014-11-20
* @link http://angular-ui.github.com/
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
/* commonjs package manager support (eg componentjs) */
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
module.exports = 'ui.router';
@christopherthielen
christopherthielen / gist:4980c9117f3185906627
Created January 9, 2015 18:49
bootstrap tooltip activation based on scope data, not DOM events
/* Implement bootstrap tooltip activation based on scope data, not DOM events */
app.config(function($tooltipProvider) {
$tooltipProvider.setTriggers( {'openTrigger': 'closeTrigger'} );
});
app.directive('popPopup', function () {
return {
restrict: 'EA',
replace: true,
scope: { title: '@', content: '@', placement: '@', animation: '&', isOpen: '&' },
function decorateit(DDO) {
if (DDO.link) {
var reallink = DDO.link;
DDO.link = function(scope, elem, attrs, ctrls) {
scope.myCoolScopeFunction = function() {
// scope.$on or whatever you need
};
return reallink(scope, elem, attrs, ctrls);
}