question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

elements schema: detect dangling attributes

See original GitHub issue

In the ideal world we should be able to detect “dangling” attributes. In the <div foo> example we should report foo as “dangling” when:

  • foo is not a valid HTML attribute (how come should we identify valid attributes? From a spec / schema?)
  • there is no matching directive
  • it wasn’t consumed by a binding / event handler / var declaration / other ng-specific construct
  • it is not prefixed with data- (?)

In practice “dangling” attributes in templates are most probably attributes are introduced due to:

  • typos
  • forgetting to add a directive (in the directives for the @View annotation) that should match a given attribute

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:23 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
jelbourncommented, Aug 27, 2018

Per #25005, this should now track, at least, that doing something like

host: {
  'attr.aria-label': 'Hello'
}

should throw an error (missing [ ])

0reactions
angular-automatic-lock-bot[bot]commented, Oct 9, 2021

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XML Schema Part 1: Structures - W3C
The purpose of an XML Schema: Structures schema is to define and describe a class of XML documents by using schema components to...
Read more >
Schema Operations - Software AG Documentation
Changing Element and Attribute Values in the Physical Schema ... It is very difficult to detect all cases where a schema modification still...
Read more >
xsd - xs:any wrapper xml schema validation - Stack Overflow
First, xs:any has a processContents attribute with values strict, lax, or skip. Strict means "validate the content; if you can't find a ...
Read more >
AttributeGroupReference - Saxonica
An XML Schema Attribute Group Reference, corresponding to an xs:attributeGroup element with a 'ref' attribute. Constructor Summary. Constructors ...
Read more >
Creating Variable Content Container Elements - xFront
Note that the <import> element does not have a schemaLocation attribute to identify a particular schema which implements sensor_type. (Stated differently, this ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found