Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with ng-transclude #1

Open
nikkwong opened this issue Apr 16, 2015 · 1 comment
Open

Bug with ng-transclude #1

nikkwong opened this issue Apr 16, 2015 · 1 comment

Comments

@nikkwong
Copy link

There is a slight bug in the template attribute of the directive, at

template: '<a ng-click="open()" ng-transclude>{{name}}</a>',

At least in Angular 1.4+, anything within the transcluded element will be replaced with the directive. This will cause {{name}} to be erased and show no 'a' element to a user. To achieve something similar, you should do.

template: '<a ng-click="open()">{{name}}<div ng-transclude></div></a>',
@britztopher
Copy link
Owner

@nikkwong thanks for the catch. Ill update this ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants