Capturing Page Source (HTML Snapshot) After Angular Templating

后端 未结 6 985
栀梦
栀梦 2020-12-29 05:58

Quick angular.js question...

If I have a webpage with content like this:

{{message}}

And I

6条回答
  •  心在旅途
    2020-12-29 06:56

    As Langdon said, Chrome will do. I managed to get this done through Chrome's Inspector's "Edit as HTML" option.

    First save the page (from now on PAGE_ORIGINAL) as "Webpage, complete". (Saved page will be referred as PAGE_COPY.)

    1. Open Chrome and inspect any element on PAGE_ORIGINAL. Inspector will open.
    2. Right-click on PAGE_ORIGINAL's source code's body tag, choose "Edit as HTML", and copy tag and everything within.
    3. Replace body and its contents on PAGE_COPY with what you just copied.
    4. Remove Angular by deleting references to it on PAGE_COPY.

    Worked for me. :-) (I tried commenting on Langdon's answer, but didn't have enough rep.)

提交回复
热议问题