Questions tagged [transclusion]

transclusion (verb: transclude) is a feature in multiple platforms allowing embedding of content from other sources.

Resources:

207 questions
0
votes
1 answer

Angular app can't find controller on transclude

I am unable to get my controller linked to my view. If I include the view using ng-view and have the controller name in the route, the transclusion fails in Angular-route.js when it trys to link in the ngViewFillContentFactory. If I use the…
pthalacker
  • 2,056
  • 3
  • 20
  • 37
0
votes
1 answer

AngularJS : Transcluded directive and access to model

I'm creating a smart input directive which will wrap a text input element and it requires access to the model on the input element in order to manipulate some classes on the directive. Because the input element can be one of many types (text, email,…
Marko
  • 71,361
  • 28
  • 124
  • 158
0
votes
1 answer

AngularJS: Modify transcluded attribute key in directive

Given: And the directive: app.directive('radio', function () { return { restrict: 'E', replace: true, transclude: true, scope: { radioName: '@' }, …
ucsarge
  • 1,260
  • 11
  • 10
0
votes
1 answer

How to bind a transcluded template to a different controller?

I'm trying to pass a template through a directive to a dynamic controller (known at runtime from the directive perspective). Something like this:

{{person.name}} - {{person.age}}

var data = { …
0
votes
0 answers

Accessing controller scope from transcluded content

I am working on my first Angular app (yay!). I'm trying to have a generic modal component which can declare a title, custom content and any number action buttons. Background setup follows, then my questions at the bottom. Here's how I'd like to use…
ravinggenius
  • 816
  • 1
  • 6
  • 14
0
votes
1 answer

How do I access a controllers scope after a transclusion?

Correct me if I am wrong, but I think in the firstDirective scenario, I am unable to achieve the behavior of the secondDirective because it's creating a sibling scope; I am unable to access the template's controller's scope. I want the behavior of…
Strawberry
  • 66,024
  • 56
  • 149
  • 197
0
votes
1 answer

Access isolated parent scope from a transcluded directive

I've encountered a situation that seems to be the opposite of every similar question here on StackOverflow. I've got a directive, that simply wraps whatever content it has with a scrollable div of some sort. It looks more or less like…
motig88
  • 402
  • 5
  • 16
0
votes
2 answers

AngularJS: Insert template after element and trigger show on click

I've created this Plnkr to show what I've started: http://plnkr.co/edit/LzcbPMqqiQbFjVzw4kDO?p=preview Two questions: How do get angular to leave the original button in place and insert the template after it, instead of inserting the template as a…
zcourts
  • 4,863
  • 6
  • 49
  • 74
-1
votes
1 answer

What's Angular transclusion?

What's exactly transclusion in Angular. I found some information about it in AngularJS but how it's working in Angular. When to use it in practise and in which cases?
witosh
  • 79
  • 3
-1
votes
1 answer

What is the difference between the component architecture and multi-transclusion model in AngularJS?

I understand what the component architecture is, I don't understand how it is different from the multi-transclusion model. Can someone please explain?
-1
votes
1 answer

transclusion seems to drop controller

Let's say I have the following two directives: angular.module('test').directive('apiDirective', function (){ return { restrict: 'A', controller: function () { this.awesomeFunction = function () { console.log("CHECK ME OUT…
-2
votes
1 answer

Proper file transclusion for classic JScript

I want to have something like C's #include directive or Python's import() function. I would appreciate it if you consider that this is not a Javascript, VBScript, nor a JScript.Net question. I want the functionality in the JScript .js files run by…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
1 2 3
13
14