Angular Light 0.6

    Angular Light is a standalone client MV (C / VM) framework, which is based on the ideas of Angular.js and Knockout.js, and looks like a simplified Angular.js

    The main changes in recent years:
    • Support for "modern" browsers without dependencies ( 12kb ): Google Chrome, Firefox, IE9 + (IE8 needs jQuery)
    • Animation module made , you can use CSS from Angular.js 1.2+
    • One-time binding - after receiving the first data, $ watch is deleted, for this you need to append "::" to the beginning, for example {{:: variable}} instead of {{variable}}.
    • Saving the resulting list in the al-repeat directive , after applying the filter, the original list may change and sometimes you need to get the result, for example, to determine the number of elements or to display “the list is empty”. You can use: al-repeat="item in list | filter store to variable", example .
    • There was a “track by” for the al-repeat directive - a way to identify items in a list, works by analogy with ng-repeat from Angular.js
    • Tags for al-app allow you to bind different parts of the DOM to the same scope. It can be useful when several different frameworks are used on the page and it is not advisable to “capture” the entire document, with the help of tags the application can be “scattered” in different places, for example .
    • In the $ watch event, the $ finishBinding event has appeared , it fires after the binding occurs. This can be used in place of timeout in directives (or controllers :)).
    • Now you can make a text directive static at any time using env.finally ()

    Optimizations of different parts of the framework have also been made, it is slowly being covered with tests - more than 250 checks are already in place, at the moment the framework has been successfully used in battle for a year now.

    Previous articles:

    Also popular now: