Is a simple JavaScript module that determines whether or not the given browser supports SVG.
npm install if-svg --save-dev
// this is now a module: | |
// https://github.com/WebReflection/backtick-template#es2015-backticks-for-es3-engines-- | |
var template = require('backtick-template'); | |
// just string | |
const info = 'template'; | |
`some ${info}` === template('some ${info}', {info}); |
angular.module('pivotDirective') | |
.directive('pivot', ['localStorageService', function (localStorageService) { | |
return { | |
restrict: 'AE', | |
scope: { | |
data: '=' | |
}, | |
link: function (scope, elem, attr) { | |
var renderers = $.extend($.pivotUtilities.renderers ); |
function wash(socks) { | |
var socksYouHave = []; | |
var sockSizes = ['small', 'medium', 'large']; | |
socks.forEach(function(sock) { | |
// Weird socks never survive | |
if(sockSizes.indexOf(sock) === -1) return; | |
// One in ten socks never make it out alive | |
if(Math.floor(Math.random() * 10) === 0) return; | |
var path = require('path'); | |
var async = require('async'); | |
var mathjs = require('mathjs'); | |
var ReactPackager = require('react-native/packager/react-packager'); | |
var blacklist = require('react-native/packager/blacklist'); | |
var reactNativePackage = require('react-native/package'); | |
var NUM_TESTS = 100; | |
function test() { |
npm install -g jspm@beta
jspm init
jspm install angular2 reflect-metadata zone.js es6-shim
This will create a jspm_packages
folder, and a config.js
file.
Open the config.js
file - this file manages options for the System.js loader - tweak it as appropriate
import somethingHTML from './something.html!text'; | |
angular.module('myApp',[]) | |
.directive('myDirective', function() { | |
return { | |
template: somethingHTML | |
} | |
}); |
(function() { | |
'use strict'; | |
angular | |
.module('myModule') | |
.directive('myDirective', myDirective); | |
const template = ` | |
<div class="my-directive-template"> | |
<h1>Using multi-line Strings for templates</h1> |
A Simplex, Hypercube and Cross Polytope from Paul Bourke's Hyperspace User Manual.
Visualized with hypersolid.js by Miłosz Kośmider.
jspm_packages |