Provider | Singleton | Instantiable | Configurable |
---|---|---|---|
Constant | Yes | No | No |
Value | Yes | No | No |
Service | Yes | No | No |
Factory | Yes | Yes | No |
Decorator | Yes | No? | No |
Provider | Yes | Yes | Yes |
This file contains 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
//Based on gulpfile.js from Google Web Starter Kit. | |
//https://github.com/google/web-starter-kit | |
'use strict'; | |
// Include Gulp & Tools We'll Use | |
var gulp = require('gulp'); | |
var $ = require('gulp-load-plugins')(); | |
var del = require('del'); | |
var runSequence = require('run-sequence'); | |
var browserSync = require('browser-sync'); |
##Setup your server (this would ideally be done with automated provisioning)
- add a deploy user with password-less ssh see this gist
- install forever
npm install -g forever
##Install flightplan
npm install -g flightplan
- in your project folder
npm install flightplan --save-dev
- create a flightplan.js file
This file contains 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
/********************************************** | |
* Ink v1.0.5 - Copyright 2013 ZURB Inc * | |
**********************************************/ | |
/* Client-specific Styles & Reset */ | |
#outlook a { | |
padding: 0; | |
} |
This file contains 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
// Material Design Colour Palette | |
// by Brandon Himpfen http://www.himpfen.com/ | |
// Red | |
$md-red-50: #ffebee; | |
$md-red-100: #ffcdd2; | |
$md-red-200: #ef9a9a; | |
$md-red-300: #e57373; | |
$md-red-400: #ef5350; | |
$md-red-500: #f44336; |
First define the margin
object with properties for the four sides (clockwise from the top, as in CSS).
var margin = {top: 20, right: 10, bottom: 20, left: 10};
Then define width
and height
as the inner dimensions of the chart area.
var width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
Lastly, define svg
as a G element that translates the origin to the top-left corner of the chart area.
This file contains 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
// 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!" |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
-
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
This file contains 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
/** | |
* Lined Paper | |
*/ | |
html { | |
background-color:white; | |
padding:10px; | |
font-family:sans-serif; font-size:15px; | |
} | |
body { |
NewerOlder