Accessibility and all these JavaScript frameworks

I use a js-framework (spine.js in my case) in my latest site. Still I make sure that non-js browsers (certainly not over zealous: think SEO) can navigate my site and digest the contents. As an example I’m going with a search-page with products being shown. Products can be paged, filtered, sorted. Of course this is … Read more

Ways to save Backbone.js model data?

Basically Models have a property called attributes which are the various values a certain model may have. Backbone uses JSON objects as a simple way to populate these values using various methods that take JSON objects. Example: Donuts = Backbone.Model.extend({ defaults: { flavor: ‘Boston Cream’, // Some string price: ‘0.50’ // Dollars } }); To … Read more

using setInterval in angularjs factory

You can use $timeout as an interval. var myIntervalFunction = function() { cancelRefresh = $timeout(function myFunction() { // do something cancelRefresh = $timeout(myIntervalFunction, 60000); },60000); }; If the view is destroyed, you can destroy it with listening on $destroy: $scope.$on(‘$destroy’, function(e) { $timeout.cancel(cancelRefresh); });

What is the difference between React Native and React?

ReactJS is a JavaScript library, supporting both front-end web and being run on a server, for building user interfaces and web applications. It follows the concept of reusable components. React Native is a mobile framework that makes use of the JavaScript engine available on the host, allowing you to build mobile applications for different platforms … Read more

Difference between the ‘controller’, ‘link’ and ‘compile’ functions when defining a directive

I’m going to expand your question a bit and also include the compile function. compile function – use for template DOM manipulation (i.e., manipulation of tElement = template element), hence manipulations that apply to all DOM clones of the template associated with the directive. (If you also need a link function (or pre and post … Read more