Wednesday, February 20, 2013

Angular Notes for the day

Found a good resource today AngularJs Cheetsheet.  They hid it on the home page of the google group for AngularJs.

Painful lesson earlier this week.  Don't forget the 'ng-transclude' attribute in the HTML for your template!

Nice sample for calling controller methods in html with angular expression on jsFiddle.


<span ng-class="cssActiveIf(folder)">
        <a href="javascript:void(0)">{{folder.name}}</a>
  </span>

function AssetCtrl($scope) {

 $scope.cssActiveIf = function(item) {
        return (item === $scope.selection.currentFolder) ? "active" : "";
    };
}



2 comments:

  1. Yes it is very good resource for angular.js.

    DO you know any such kind of resources for angular.js 2.

    Angularjs Training in Chennai

    ReplyDelete
  2. Yes it is very good resource for angular.js.

    DO you know any such kind of resources for angular.js 2.

    Angularjs Training in Chennai

    ReplyDelete