Update QLDoc for getATemplateArgument

Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
Asger F
2021-01-21 10:51:46 +00:00
committed by GitHub
parent deca7f3cd6
commit 34280f90b0

View File

@@ -356,7 +356,13 @@ module Angular2 {
/** Gets an HTML element that instantiates this component. */
HTML::Element getATemplateInstantiation() { result.getName() = getSelector() }
/** Gets an argument that flows into the `name` field of this component. */
/**
* Gets an argument that flows into the `name` field of this component.
*
* For example, if the selector for this component is `"my-class"`, then this
* predicate can match an attribute like: `<my-class [foo]="1+2"/>`.
* The result of this predicate would be the `1+2` expression, and `name` would be `"foo"`.
*/
DataFlow::Node getATemplateArgument(string name) {
result =
getAttributeValueAsNode(getATemplateInstantiation().getAttributeByName("[" + name + "]"))