zachsnow / ng-multi-transclude

ng-multi-transclude
MIT License
79 stars 19 forks source link

Attach elements outside the transclusionFn. #11

Closed keeshii closed 10 years ago

keeshii commented 10 years ago

DOM should be manipulated outside the transcludeFn, otherwise ng-click and other directives that are connected to outher scope won't work. For example:

```
```

The first button won't respond to ng-click.

zachsnow commented 10 years ago

Hey @keeshii can you clarify your example? I think some formatting mixed up.

keeshii commented 10 years ago

Ok, nevermind. I have forgotten, that I have made an another change to your code, I have replaced: element.append(el) with element.after(el.contents()); element.remove(); (I wanted to get rid of elements with name and ng-multi-transclude from dom). After that ng-click from first transclusion stopped to work.