FAQΒΆ

  • How to call Alert from al-click

  • Where can I take a debug version

    Here you can get release and debug of any version, also you can use bower: bower install alight

  • Where is $http service

    Angular Light doesn’t have it, you can use jQuery.ajax or anyone that you usually use. But there is alight.f$.ajax for inner purpose.

  • Angular Light updates a whole DOM or it tracks changes and update only changed elements?

    Only changed elements.

  • I need Angular Light runs my function when a bindings process will finish.

    You can observe it scope.$scan("$finishBinding", callback)

  • Is it possible to pass jquery $element to function from al-click?

    You can use $event that contains element, al-click=”someFunc($event)”

  • How can I use al-repeat not as attribute, but as a comment?

    al-repeat supports comment binding, example

  • Why al-show with an empty array doesn’t hide my element: al-show="model.array"?

    Because there is javascript and !!model.array always give you true, you can use al-show="model.array.length"

  • Where is “$odd, $even, $first, $last, $rest” for al-repeat?

    You can append any attributes, example how to append $odd $even

  • How to sort an array?

    Manual sort Filter orderBy Sort props of an object Call a method

  • Can I rename directives?

    Yes, alight.directives.al.myKeypress = alight.directives.al.keypress

  • How to call my function when Scope.$scan finish digets process?

    You can pass your function as callback Scope.$scan(callback)

  • How to redraw bind-once?

    Example

  • Where is DI?

    Angular Light doesn’t have it, but you can make it for yourself, example

  • Why al-repeat displays not all items?

    Probably a input list contains doubles, in this case you should declare ID - using track by

    <div al-repeat="item in list track by $index">
    
    <div al-repeat="item in list track by items.id">
    

    Look at al-repeat

comments powered by Disqus