mardi 23 juin 2015

Can I write directive that is decoupled from the main app?

I am starting to write a little library that uses angular. I want to write a directive that is not coupled to the first app that is initialized. I want to write a directive that somebody would add to their app and it would just work.

Instead of:

angular.module('realEstateApp', []);
   angular.module('realEstateApp').directive(etc);

Just use:

   angular.directive(etc)

If I can't do this, do you have some workaround to give me?




Aucun commentaire:

Enregistrer un commentaire