- fnakstad/angular-client-side-auth
- ryandrewjohnson/ui-router.grant
- Narzerus/angular-permission
- artgon/angularjs-role-based-auth
- ng-role-auth
- arthur.gonigberg.com/angularjs-role-based-auth
- url-route-authorization-and-security-in-angular
- adamalbrecht.com/authorization-with-angular-and-ui-router
- angularjs-role-based-access-on-gui
- [medium.com/techniques-for-authentication-in-angularjs-apps](https://medium.com/opinionated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| I've compiled a list of angular directives according to their priorities (from most priority to lesser priority). | |
| Also, terminal property is included for each directive that asserts it | |
| */ | |
| ng-switch 1200 | |
| ng-repeat 1000 terminal | |
| ng-if 600 terminal | |
| ng-controller 500 | |
| ng-init 450 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.directive('faFastScroll', ['$parse', function ($parse) { | |
| var Interval = function(min, max) { | |
| this.min = min || 0; | |
| this.max = max || 0; | |
| }; | |
| Interval.prototype.clip = function(min, max) { | |
| if(this.max <= min || this.min >= max) { | |
| this.min = this.max = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('d3', []) | |
| .factory('d3Service', ['$document', '$window', '$q', '$rootScope', | |
| function($document, $window, $q, $rootScope) { | |
| var d = $q.defer(), | |
| d3service = { | |
| d3: function() { return d.promise; } | |
| }; | |
| function onScriptLoad() { | |
| // Load client in the browser | |
| $rootScope.$apply(function() { d.resolve($window.d3); }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(global){ | |
| /* Initialization meta module. Pelle Bjerkestrand. WTFPL. */ | |
| 'use strict'; | |
| var app = global.app || {}; | |
| function init(){ | |
| for (var key in app) { | |
| if (app.hasOwnProperty(key)) { | |
| var module = app[key]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.directive('infiniteScroll', [ | |
| '$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) { | |
| return { | |
| link: function(scope, elem, attrs) { | |
| var checkWhenEnabled, handler, scrollDistance, scrollEnabled; | |
| $window = angular.element($window); | |
| elem.css('overflow-y', 'scroll'); | |
| elem.css('overflow-x', 'hidden'); | |
| elem.css('height', 'inherit'); | |
| scrollDistance = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/ | |
| /*At least requires the meta viewport tag with content 'width=device-width'*/ | |
| @media only screen and (max-width: 1080px) and (orientation : portrait) { | |
| /* PORTRAIT: | |
| Windows Surface Pro*/ | |
| } | |
| @media only screen and (max-width: 800px) and (orientation : portrait) { | |
| /* PORTRAIT: | |
| Acer Iconia Tab A100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
NewerOlder