Is it possible to pass parameters to a controller using the angularjs directive?

1

I would like to pass a jade parameter to the angle controller, but the view is loaded by a directive and I have the doubt that it is possible to pass some arguments.

The jade is loaded in the following way ...

    mixin mi-cuenta(miCuenta)
        micuenta(class="row")&attributes(attributes)

The angle directive is the following ...

   angular.module('cuentas')
          .directive('micuenta', () => {
               return {
                    controller: 'MiCuentaCtrl as miCuentaCtrl',
                    replace: true,
                    template: '../../views/tpl.html',
                    scope: {}
               }
          })

in Jade myCount is a JSON with information that I want to add to tpl.html but I do not know how to pass it to the controller.

    
asked by Alberto Rojas 06.09.2017 в 18:49
source

0 answers