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

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

AngularJS passing data to $http.get request

An HTTP GET request can’t contain data to be posted to the server. However, you can add a query string to the request. angular.http provides an option for it called params. $http({ url: user.details_path, method: “GET”, params: {user_id: user.id} }); See: http://docs.angularjs.org/api/ng.$http#get and https://docs.angularjs.org/api/ng/service/$http#usage (shows the params param)

What is the need of JSF, when UI can be achieved with JavaScript libraries such as jQuery and AngularJS

JSF to plain JSP/Servlet/HTML/CSS/JS is like as jQuery to plain JS: do more with less code. To take PrimeFaces (jQuery + jQuery UI based) as an example, browse through its showcase to see complete code examples. BootsFaces (jQuery + Bootstrap UI based) has also a showcase with complete code examples. If you study those examples … Read more