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
2 answers

Angular directive transclude breaks layout

I'm trying to transclude a table row (a) in a ng-repeat loop so that another table row (b) can be shown/hidden when a user clicks (a). Both table rows are rendering, however, the element - needed to include (a) before (b), in the…
0
votes
1 answer

html parent content wont show up though to ngInclude anglurjs

I have these two template which is for tree view, I want to use the first approach but it seems that there is a problem or I've missed something. First Approach (desirable but does not work) TreeTemplate.html
0
votes
0 answers

How to access $index value of ng-repeat within directive using ng-transclude

I am trying to access the $index value of the ng-repeat from within directive. Here's my code: .directive('myGrid', function () { return { restrict: 'E', templateUrl: 'templates/my-grid.html', transclude: true } }) // my-grid.html
0
votes
1 answer

Angular: Next section shown before previous section hidden - using ng-show

I'm implementing a reusable step-by-step wizard directive in angular based on this example. It's working pretty well, but like in the example, I'm using ng-show to hide all steps but the current one. This results in a quick flicker whenever I change…
Daniel
  • 341
  • 2
  • 17
0
votes
1 answer

Toggle component do not work on transcluded directive

I have one directive with toggle components on the view. The configuration of toggle component is very simple: input(type="checkbox" checked data-toggle="toggle") The directive works fine, but if this directive is loaded inside another directive…
0
votes
0 answers

AngularJS, Loading spinner directive with transclude?

I want to make a directive with shows a spinner when $http request is executing. I thought this would be working (e.g. load users): Main Controller app.controller('UserListController', function($scope, $http) { $scope.users = []; …
Ulrira
  • 229
  • 4
  • 12
0
votes
2 answers

I got TypeError: transclude is not a function and also can't able to bind select options value in select2 in angularjs

I got one plunker code for multi select2 drop down using angularjs. It works fine except the option value is not bound in select option while running with my code. I have linked the plunker demo below but the code in plunker executed fine without…
0
votes
0 answers

ng-transclude in angular js

According to the definition of Transclusion in angular.js "With transclude enabled, anything that exists inside the welcome element in the view will be appended to the contents of whichever element in the template has the ng-transclude attribute.",…
Harkirat Saluja
  • 7,768
  • 5
  • 47
  • 73
0
votes
0 answers

How to access child controller method of directive when isolated scope is not created

I am trying to create one directive which has its own controller which contains some methods. I am setting scope:false to ensure that the directive will not create an isolated scope. Directive Definition is : angular.controller("myController",…
Mahesh
  • 1,427
  • 2
  • 19
  • 42
0
votes
0 answers

ngTransclude in ngSwitch

I have a popover, and this popover has ngTransclude. We show/set popup with ngSwitch (true/false). The issue here is that ngTransclude is inside ngSwitch and this slows down the application, because every time we show a popover we have to…
0
votes
2 answers

Angularjs directive add directives as attribute and bind them dynamically

Hi i am working on directive where i need to edit DOM add ng-src attribute and a model to it. This is my DOM I need the result DOM be …
0
votes
1 answer

Directive to directive communication using ng-transclude and require

I have two directives, lets say: angular.module('app').directive('directiveA', directiveA); function directiveA(){ return { restrict: 'E', transclude: true, scope: {}, templateUrl:…
0
votes
0 answers

Nested ng-tranclude

I have the following code. I want to transclude at 3 different levels which I can't see why it wouldn't work
heading content …
jamie holliday
  • 1,617
  • 9
  • 26
  • 39
0
votes
1 answer

Odd behavior when using transclusion without cloning

While experimenting with transclusion a bit, I wanted to see if the transcluded directive, which requires a certain parent directive controller, will be able to find it after being transcluded under the required parent. The Directives i've used are…
0
votes
1 answer

Watching for changes in $pristine or $touched in transcluded input

I'm trying to build a directive around an input element that responds when the model is dirtied or touched. The required ngModel seems to reflect the changes in the value and view of the input model, but none of the other attributes. I'm suspecting…
Tantelope
  • 597
  • 1
  • 8
  • 24