: keep an eye on it [team]

posted in: AngularJS, JavaScript | 0 tries to be a thin layer between frontend and backend by only sharing models and data. This is done throught websockets bases on sock.js and a small multi-channel-layer sock-channels.

Implementing the IndexedDB Factory [team]

posted in: AngularJS, JavaScript | 0

Using the IndexedDB Factory is not a complete example with querying, but simply a brute force approach to dumping and retrieving data through the IndexedDB Factory for the moment. We will refine this later.   angular.module(‘todomvc’) .service(‘todoModel’, [‘$rootScope’, ‘todoREST’, ‘indexedDBDataService’, function … Continued

IndexedDB Factory in AngularJS [team]

posted in: AngularJS, JavaScript | 0

The Factory   angular.module(‘todomvc’) .factory(‘indexedDBDataService’, [‘$window’, ‘$q’, function ($window, $q) { var indexedDB = $window.indexedDB; var db = null; var lastIndex = -1; var open = function () { var deferred = $q.defer(); var version = 1; var request =“todoData”, … Continued

Filtering in your Angular Model [team]

posted in: AngularJS, JavaScript | 0

Assume you loaded all the todos into an array in the model // model var todos; var todosFilterd; function getAllTodos(){ todoREST.getAll().then(function(result) { $rootScope.$broadcast(‘todoModel::gotTodosFromRestEvent’); transformTitles(; todos =; }); } function filterTodos() { this.todosFilterd = this.todos.filter(function (val) { return val.completed === … Continued

Node Modules the Canonical way [team]

posted in: JavaScript, NodeJS | 0

The module // solution_filter.js var fs = require(‘fs’) var path = require(‘path’) module.exports = function (dir, filterStr, callback) { fs.readdir(dir, function (err, list) { if (err) return callback(err) list = list.filter(function (file) { return path.extname(file) === ‘.’ + filterStr }) … Continued

The two pillars of JavaScript [team]

posted in: JavaScript | 0 JavaScript is one of the most important programming languages of all time, not simply because of it’s popularity, but because it popularized two features which are extremely important for the evolution of programming: Objects without classes (and prototypal inheritance aka … Continued

Angular MVC example [team]

Lets chat about this approach // controller todoREST.getAll().then(function(posts) { // hi rest service get me all the posts, I’ll wait! todoModel.applyDomainRules(posts); // hi model here are all the posts, transform them according to your Domain rules! $scope.allPosts = posts; // … Continued

1 2 3 4 5