Law of Demeter - sgml/signature GitHub Wiki

  • Functions all take the same set of arguments
  • Each template is a standalone document
  • No string literals or global variables in functions
  • Methods and arguments are passed via templates

Example:

  • Template API converts arguments into instances

Instead of:

function foo(){
var injector = angular.injector(['ng', 'myModule']);
var greeter = injector.get('greeter');
}

do:


with: function foo(){ var modules = ['ng', 'myModule']; console.log(foo.class); }

and isolateScope and bindToController set to true by default.

References

⚠️ **GitHub.com Fallback** ⚠️