Please ask your question to the community at StackOverflow.
This gist was linked from the UI-Router issue tracker. This issue tracker is reserved for feature requests and suspected UI-Router bugs.
| /** | |
| * 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); | |
| } | |
| ); |
Please ask your question to the community at StackOverflow.
This gist was linked from the UI-Router issue tracker. This issue tracker is reserved for feature requests and suspected UI-Router bugs.
| /** | |
| * 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) |
| /** | |
| * 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'; |
| /** | |
| * 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'; |
| /** | |
| * 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'; |
| /* 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); | |
| } |