lucasbrigida/angular-riot

So strange demo

isnifer opened this issue · 3 comments

I'm sorry. I came here accidentally.
Which problem your module can solve?

Your demo contains huge mistake - DOM logic in controller.
Do you really think that your solution is better than simple IIFE?

(function (angular, riot, undefined) {
    angular
        .module('someModule')
        .directive('someDirective', someDirective);

    function someDirective () {
         return {
              link: function (scope, elem, attrs) {
                  riot.mount('todo', {todos: 10});
              }
         };
    }    
})(angular, riot);

DOM Logic in controller? this is a directive not a controller? :)

I do agree with @isnifer the example is not good at all. At least change it to a directive instead of a controller.

Yes, you're right! This should be a policy. In the coming days will improve the documentation and add new features.