isr: NG0500: During hydration Angular expected <div> but found <button>
timsar2 opened this issue · comments
Description
By creating a new angular project I just add a button in appcomponent.html under the main tag and I got this error During the watch mode:
npm run watch
node .\dist\isr\server\server.mjs --watch
Error: NG0500: During hydration Angular expected <div> but found <button>.
Angular expected this DOM:
<main _ngcontent-ng-c4078563999="" class="main">
…
<router-outlet>…</router-outlet>
<div>…</div> <-- AT THIS LOCATION
…
</main>
server.ts:
const isr = new ISRHandler({
indexHtml,
invalidateSecretToken: process.env['INVALIDATE_TOKEN'] || 'MY_TOKEN', // replace with env secret key ex. process.env.REVALIDATE_SECRET_TOKEN
enableLogging: !environment.production,
serverDistFolder,
browserDistFolder,
bootstrap,
commonEngine
});
"@rx-angular/isr": "^17.1.0"