Component for displaying and reading news articles.
- Source:
Example
<NewsReader/>
Members
(static) methods
Methods for the NewsReader component.
Methods
(function) data() → {object}
Data properties for the NewsReader component.
- Source:
Returns:
The initial data object.
- Type
- object
(function) destroyed()
Lifecycle hook called when the component is destroyed.
- Source:
(method) parseAndEvaluateHtml(htmlContent) → {string}
Parses and evaluates the HTML content.
Can be used to handle require
functions or other custom logic.
Parameters:
Name | Type | Description |
---|---|---|
htmlContent |
string | The HTML content to parse and evaluate. |
- Source:
Returns:
The parsed and evaluated HTML content.
- Type
- string
(method) reload()
Reloads the news articles by making an API request. Appends the new articles to the existing ones in the store.
- Source:
(function) mounted()
Lifecycle hook called when the component is mounted.
- Source: