PHP Classes

File: assets/js/pages/ErrorPage.js

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Simple SPA   assets/js/pages/ErrorPage.js   Download  
File: assets/js/pages/ErrorPage.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Simple SPA
Demonstrates single page applications
Author: By
Last change:
Date: 17 days ago
Size: 666 bytes
 

Contents

Class file image Download
import Component from '../component/Component.js'; class ErrorPage extends Component { constructor() { super(); this.title = '404 Não Encontrado - Meu SPA'; this.description = 'Página de erro amigável.'; this.keywords = 'contato,email,telefone,endereço'; } render() { document.head.appendChild(this.createMetaTag('robots', 'noindex')); return `<div>Error: Página não encontrada.</div>`; } createMetaTag(name, content) { let tag = document.createElement('meta'); tag.name = name; tag.content = content; return tag; } } export default ErrorPage;