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
angular.module('fluxTodo').factory('TodoActionCreator', function(dispatcher) { | |
return { | |
createTodo: function(text) { | |
dispatcher.handleViewAction({ | |
actionType: 'CREATE', | |
text: text | |
}); | |
}, | |
toggleTodo: function(id) { | |
dispatcher.handleViewAction({ |
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
'use strict'; | |
////////////////////////////////////////////// | |
// Service object to interact with some API // | |
////////////////////////////////////////////// | |
angular.module('myApp.services') | |
.factory('someApi', ['$q', '$http', function($q, $http) { | |
var endPointUrl = "[some api end point]"; | |
return { |
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 app = angular.module('myApp', []); | |
app.directive('jqShowEffect', ['$timeout', function($timeout) { | |
return { | |
restrict: 'A', | |
link: function(scope, element, attrs) { | |
// configure options | |
var passedOptions = scope.$eval(attrs.jqOptions); | |
// defaults | |
var options = { |
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
""" | |
Grammar: | |
======== | |
Expression --> AndTerm { OR AndTerm}+ | |
AndTerm --> Condition { AND Condition}+ | |
Condition --> Terminal (>,<,>=,<=,==) Terminal | (Expression) | |
Terminal --> Number or String or Variable | |
Usage: | |
====== |