- Jump down to the plugin
- Try it on Codepen — and heart it!
- Try it on Tailwind Play
- Read my blog post about this plugin - and share it!
and star this gist!
and star this gist!
/** | |
* A simple yet powerful event system capable of dispatching events with any number of arguments | |
* | |
* @example | |
* const eventSystem = new EventSystem(); | |
* eventSystem.on('my-event', () => console.log('hello event system')); | |
* eventSystem.on('my-event', () => console.log('hello from here too')); | |
* | |
* // In the future | |
* eventSystem.dispatch('my-event'); |
In your command-line run the following commands:
brew doctor
brew update
function SaferHTML(templateData) { | |
var s = templateData[0]; | |
for (var i = 1; i < arguments.length; i++) { | |
var arg = String(arguments[i]); | |
// Escape special characters in the substitution. | |
s += arg.replace(/&/g, "&") | |
.replace(/</g, "<") | |
.replace(/>/g, ">"); |
/** | |
* A mixin which helps you to add depth to elements according to the Google Material Design spec: | |
* http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-dimensionality | |
* | |
* Please note that the values given in the specification cannot be used as is. To create the same visual experience | |
* the blur parameter has to be doubled. | |
* | |
* Adapted from a LESS version at https://medium.com/@Florian/freebie-google-material-design-shadow-helper-2a0501295a2d | |
* | |
* Original Author: Florian Kutschera (@gefangenimnetz), Conceptboard GmbH (@conceptboardapp) |
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |