The angular.extend() function has very powerful to copy object to another object, including all of properties from the source object(s).
Usage
angular.extend(dst, src);dst: destination object
src: source object(s)return: refercen to dst object
Ractive.js is a template-driven UI library, it transforms your templates into blueprints for application that are interative by default. Ractive.js is very similar with AngularJS, and it supports Two-way binding, animations as well. Another powerfull feature is SVG support.
You just need to prepare your html template and datas, and the Ractive.js will automatically to combine them then give you what you want. Whe you change your datas, it intelligently updates the real DOM.
First, you need to include Ractive.js to your application. Just like include other javascript librarys easily. You can download it to local and then include it. And if you want include latest version, you just put below codes to your project.
1 | <script src='http://cdn.ractivejs.org/latest/ractive.js'></script> |