- Michael Bertolacci: Building Delightfully Decoupled Directives: a Bag of Tricks
- Ryan Seddon: Building a Notification Service
- Code: http://plnkr.co/edit/CkuWnaTKJLZmiPvaUizB?p=preview
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
var http = require('http'), | |
request = require('request'); | |
var prodServer = process.env.PROD_SERVER | |
var target = process.env.TARGET | |
var app = http.createServer(function (req, resp) { | |
var origin; | |
if (req.headers.origin.match(/(localhost|\.dev|\.local)\:\d+$/)) { | |
origin = req.headers.origin; |
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
window.stoppingPropagation = (callback) -> (e) -> | |
e.stopPropagation() | |
callback(e) | |
angular.module('myApp',[]).directive 'ngTap', -> | |
(scope, element, attrs) -> | |
tapping = false | |
element.bind 'touchstart', stoppingPropagation (e) -> tapping = true | |
element.bind 'touchmove', stoppingPropagation (e) -> tapping = false | |
element.bind 'touchend', stoppingPropagation (e) -> scope.$apply(attrs['ngTap']) if tapping |
Chord diagrams show directed relationships among a group of entities. This example also demonstrates simple interactivity by using mouseover filtering. Layout inspired by Martin Krzywinski's beautiful work on Circos.
- http://www.bikeexchange.com.au/ is launched! Go @mipearson!
- @markdalgleish wrote up his promises piece: http://markdalgleish.com/2013/06/using-promises-in-angularjs-views/
- @sebasporto wrote up about his Railscamp project - nested directives: http://sporto.github.io/blog/2013/06/24/nested-recursive-directives-in-angular/
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
var isAndroidJellyBean = (function() { | |
var ua = navigator.userAgent, | |
matches = ua && ua.match(/Android\s+([\d\.]+)/), | |
androidNr = matches && parseFloat(matches[1]); | |
return !!(androidNr && androidNr > 4.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
diff --git a/examples/webapp/app/post.hbs b/examples/webapp/app/post.hbs | |
new file mode 100644 | |
index 0000000..7bc8704 | |
--- /dev/null | |
+++ b/examples/webapp/app/post.hbs | |
@@ -0,0 +1,5 @@ | |
+{{#markdown}} | |
+## Here are my thoughts | |
+ | |
+Gosh, do I have a lot of them? |
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
diff --git a/examples/webapp/app/layout.hbs b/examples/webapp/app/layout.hbs | |
index b149886..69dc14f 100644 | |
--- a/examples/webapp/app/layout.hbs | |
+++ b/examples/webapp/app/layout.hbs | |
@@ -7,6 +7,14 @@ | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>{{ config.title }}</title> | |
+ | |
+ <meta name="breakpoint" content="two" media="(max-width: 511px)"> |
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
diff --git a/examples/webapp/Gruntfile.js b/examples/webapp/Gruntfile.js | |
index 905f175..f419097 100644 | |
--- a/examples/webapp/Gruntfile.js | |
+++ b/examples/webapp/Gruntfile.js | |
@@ -131,13 +131,14 @@ module.exports = function (grunt) { | |
assemble: { | |
options: { | |
data: '<%= yeoman.app %>/config.json', | |
- partials: '<%= yeoman.app %>/partials/*.hbs' | |
+ partials: '<%= yeoman.app %>/partials/*.hbs', |
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
diff --git a/examples/webapp/Gruntfile.js b/examples/webapp/Gruntfile.js | |
index 1b6e8ce..905f175 100644 | |
--- a/examples/webapp/Gruntfile.js | |
+++ b/examples/webapp/Gruntfile.js | |
@@ -130,13 +130,14 @@ module.exports = function (grunt) { | |
}, | |
assemble: { | |
options: { | |
- data: '<%= yeoman.app %>/config.json' | |
+ data: '<%= yeoman.app %>/config.json', |