Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

124
Vistas
Angular js adding attribute directive from another directive

Pretend I have this: <span ng-bind="value" my-dir my-dir-param="value"></span> So my-dir is a custom directive that adds another directive to an existing element. I guess it gonna look like this (skipping everything except some props from dir. def. object:

...
priority: 1001,
terminal: true
compile: function(el, attrs) {
 attrs.$set("some_directive", "placeholder_text");
 var compiled = $compile(el, null, 1001);
 return function linkFn(scope, el, attrs) {
  compiled(scope)
  ...some extra logic here...
}
}
...

I've tried to do such away and the problem is that ng-bind will bind on value from the directive scope, not the outer scope. I don't want to affect scopes from which other directives absorb values. What I want is that by adding my-dir directive I will apply "some_directive" and that won't affect the values that other directives receive. Thank you

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda