Разве это не просто инцидент, а не инцидент?
<tr class="" *ngFor="let state of incident">
<td>{{state.id}}</td>
</tr>
You can't have a inside an
element. As W3's content model description for the
element states:
"there must be no interactive content descendant."
(a is considered interactive content)
To get the effect you're looking for, you can ditch the tags and add a simple event handler to each button which navigates the browser to the desired location, e.g.
<input type="button" value="stackoverflow.com" onClick="javascript:location.href = 'http://stackoverflow.com';" />
Please consider not doing this, however; there's a reason regular links work as they do:
You also add a completely unnecessary requirement to have JavaScript enabled just to perform a basic navigation; this is such a fundamental aspect of the web that I would consider such a dependency as unacceptable.
You can style your links, if desired, using a background image or background color, border and other techniques, so that they look like buttons, but under the covers, they should be ordinary links.
You cannot have a button inside an a
tag. You can do some javascript to make it work however.
Приведенный ниже код отлично работает во всех браузерах:
<button onClick="location.href = 'http://www.google.com'">Go to Google</button>