208 questions
1
vote
0
answers
28
views
How to nest and transclude this example with AngularJS?
I want make this code and I'm pretty sure that a different ng-transclude directive/service is needed, but I don't know how make it.
# controller.html
<directive-folder-list>
<...
1
vote
1
answer
147
views
ng-transclude does not work any more after JQuery update
This is a weird issue i have started to encounter after the latest JQuery update.
We use angularjs 1.7.9 in out app. We have following component. It is basically a date field wrapper .
export class ...
0
votes
1
answer
125
views
AngularJS component nesting
I created a component search-context, which works well. It's configurable and it does what it's supposed to do.
<search-context context-name="Groups"
compare-columns="['displayName']"
...
0
votes
0
answers
436
views
How To Transclude Table Row Into AngularJs Component
Iv been trying to create an angularJS component for constructing a dynamic html table from a provided array.
The components template includes some ng-transclude directives as 'placeholders'/slots for ...
1
vote
1
answer
117
views
Script tag executed twice from HTML template of my directive using ng-transclude
I have a directive that transcludes some HTML fetched from CMS into my AngularJS app. When I add a script tag into my directive and add a console message to it, the message is being logged twice.
...
1
vote
0
answers
301
views
How to get a reference to transcluded element in AngularJS component
We are trying to build a component that uses transclude with several slots.
The component looks something like this:
import templateUrl from './pop-box.html';
import './pop-box.scss';
const ...
0
votes
2
answers
1k
views
How can I achieve component composition in AngularJS (similar to React render props pattern)?
I am trying to create a grid component in AngularJS that has it's grid items provided at runtime. (think render props pattern in React).
I am trying to build this using the "new" AngularJS components ...
1
vote
1
answer
513
views
Custom directive - Illegal use of ngTransclude directive in the template
I used this directive to prevent double clicks.
my code:
export function cbOneClickOnly($parse, $compile): ng.IDirective {
"use strict";
return {
compile: function(tElement: ng....
0
votes
1
answer
52
views
AngularJS Transcluded directive's scope catch from other Directive
I got transcluded directive, for example 'aDirective' and other random 'bDirective' directive. My task is: I want to get a 'aDirective's scope variable and catch it in 'bDirective'.
angular.module('...
1
vote
1
answer
216
views
Angularjs rendering directive with transclude on body
I want to create a tooltip attribute directive with transclude, and render it on the body..
for example:
<div tooltip>
<transcluded-content>content</transcluded-content>
</...
1
vote
1
answer
120
views
Access transclude slot in onInit function
I have an old AngularJS < 1.4 component that I want to convert using angular.component('component', {bindings..., onInit...}). The previous code looks like this:
angular.module('Module').directive(...
8
votes
1
answer
1k
views
How to make ngIf work after transclusion?
I have a list component where I want to define custom columns inside. These columns get transcluded into the row of the components template. Unfortunately I can't use ngIf in this context.
Here is my ...
1
vote
1
answer
834
views
How to Add ElementRef into local dom?
I want to crate a layout component to arrange groups of items, like:
<garden-bed>
<div #veg (click)="pluck()">carrot</div>
<div #veg (click)="pluck()">cabbage</div>
...
1
vote
0
answers
212
views
Pass data to transclusion scope in Angularjs
I'm trying to pass data to transclude scope to make variable existing only in there. I mean I'm creating component:
.component('testComp', {
bind: {
collection: '<'
},
...
1
vote
1
answer
98
views
How to avoid `require` and Access the controller of the parent component in transclusion
I'm trying to build a form component that receives an object as input and use the template defined into the object to ng-include the right template to render the form defined in the model.
The ...