Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Angular directives don't work inside comments #15710

Closed
pavelhoral opened this issue Feb 15, 2017 · 3 comments
Closed

Angular directives don't work inside comments #15710

pavelhoral opened this issue Feb 15, 2017 · 3 comments
Assignees

Comments

@pavelhoral
Copy link

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Angular's own directives (ngRepeat, ngIf, ...) don't work in comments, but the documentation suggests they should.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar.

http://plnkr.co/edit/gENQxhZ9aZZULmpk1tN4

What is the expected behavior?

Either Angular directives should work in comments or the documentation needs to be updated.

All of the AngularJS-provided directives match attribute name, tag name, comments, or class name.

What is the motivation / use case for changing the behavior?

Being able to use ngIf and ngRepeat on multiple rows inside table.

Which versions of AngularJS, and which browser / OS are affected by this issue? Did this work in previous versions of AngularJS? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.

1.5.x and 1.6.x

Other information (e.g. stacktraces, related issues, suggestions how to fix)

none

@Narretz Narretz self-assigned this Feb 15, 2017
@Narretz
Copy link
Contributor

Narretz commented Feb 15, 2017

The docs are incorrect in this case. I'll update it.

@pavelhoral
Copy link
Author

Maybe state specifically that ng* directives are by default EA instead of just deleting the problematic sentence (and possibly rephrasing the "Best practice" section bellow it).

@Narretz
Copy link
Contributor

Narretz commented Feb 15, 2017

most ng* directives aren't EA (most are just A). I've added this to the docs. I didn't change the best practice section, but if you have any changes, a PR is welcome :)

ellimist pushed a commit to ellimist/angular.js that referenced this issue Mar 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants