Questions tagged [angularjs-ng-transclude]

Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.

From Angularjs documentation:

Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.

208 questions
0
votes
1 answer

Nested directives with transclusion

I have a set of form directives in which duplicate code can be extracted into a separate directive. I know that I can use transclusion, but have not been able to identify any technique that allows this (element cloning or passing functions).…
0
votes
0 answers

transcluded directive not working in angular js

I have created a directive in angular js with transclude: true, and replace: true as below .directive('customElement', [function(){ return { restrict: 'E', template: '
atul
  • 552
  • 4
  • 16
0
votes
0 answers

Multiple element types in ng-transclude-slot?

I'm doing multi-slot transclusion. My directive template (important bits):
Right now my transclude property in my directive definition looks like…
Jay
  • 3,471
  • 4
  • 35
  • 49
0
votes
1 answer

In Angular how to share controller of a directive to its child content (when transclude is true)?

I tried searching for the references on SO. But not satisfied with answers. I am a newbie in Angular. I am trying to achieve transclusion by creating directive like this : app.directive('wrapperDirective',function(){ return{ …
0
votes
4 answers

Manual transclude in link with ng-repeat

I have an angular application which uses an ng-repeat-start to display some dynamic information.
David
  • 3,364
  • 10
  • 41
  • 84
0
votes
2 answers

ng-transclude inside bootstrap disabled button

Im trying to create a directive for a button with a loading state using Bootstrap 3. When the button is disabled I get some strange style which I can't seem to identify. Below I included my code. directive.js function gfkLoadingButton(settings) { …
Thijs
  • 3,015
  • 4
  • 29
  • 54
0
votes
2 answers

Angularjs nested directive scope ambiguity

I am creating a tabs directive which allows the user to add a tab. Everything is working fine but the tab-entry directive is not reading the scope selected value in the node element which is used to set the active class. Even if I change…
0
votes
1 answer

Do something when nested/transcluded directives have been compiled and linked

Think about something like the following directive markup: <-- Directive B --> I need to…
0
votes
1 answer

ngTransclude directive doesn't work, can't realize where I'm wrong

Trying to use ngTransclude first time to make custom directive, to achieve the floating label functionality as shown here: Floating label pattern — Angular JS, but it doesn't work. Here is my directive code: .directive('floatingLabel', function ()…
Anatoly
  • 5,056
  • 9
  • 62
  • 136
0
votes
1 answer

Angular scope modification inside transcluded content

Angular: Can anyone explain why transcluded content in a directive can only update objects on the scope - not variables directly on the scope. Is it just because the object and functions are ref type in javascript and why does the binding work one…
0
votes
1 answer

Angular directives with ^require - access parent scope?

I am trying to figure out how to properly use nested directives with transclusion and ^require in angular. I want to have a outter directive have a variable that gets updated by nested children directives, but I want all of the children to be…
0
votes
1 answer

Angular changing parent model from transclude scope

I'm confused from angular transclude scope. I'm trying to make let say collapsible directive. But binding inside the transclude scope will not change model of parent unless I use some object for the model eg. data.
data.prop: {{data.prop}}…
enkor
  • 167
  • 14
0
votes
1 answer

Nested directive with no template but ng-repeat in parent directive

I try to explain my problem: I have a custom directive that contains a list of elements (in this moment the elements are custom directives, but I don't know if it is correct). For each element, I need to take some values and put the values inside…
Simone
  • 2,304
  • 6
  • 30
  • 79
0
votes
1 answer

Child directive can't access parent controller

i have 2 directives that create a grid table. For each row we may have some actions and my question is can i access in some way those actions without calling $parent.$parent.action in my template? .directive("grid", function ($compile,…
0
votes
1 answer

angularJS set ngModel attr for inner transclude element

I want to set ngModel attribute to any element which is transcluded into derective. I use slot transcludes: ` transclude: { 'editor': 'editorControl' },` so then in link method I add attribute of ng-model to child of…