angular-cn/aio/src/index.html

130 lines
5.5 KiB
HTML
Raw Normal View History

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Angular</title>
<meta name="Description" content="Angular is a platform for building mobile and desktop web applications.
Join the community of millions of developers who build compelling user interfaces with Angular.">
<base href="/">
<link rel="preconnect" href="https://www.google-analytics.com">
<link rel="dns-prefetch" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://stats.g.doubleclick.net">
<link rel="dns-prefetch" href="https://stats.g.doubleclick.net">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="search" type="application/opensearchdescription+xml" href="assets/opensearch.xml">
<link rel="icon" type="image/x-icon" href="assets/images/favicons/favicon.ico">
<link rel="icon" type="image/png" href="assets/images/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="assets/images/favicons/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="assets/images/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="assets/images/favicons/favicon-16x16.png" sizes="16x16">
<link rel="apple-touch-icon" sizes="144x144" href="assets/images/favicons/favicon-144x144.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicons/favicon-144x144.png">
<!-- NOTE: These need to be kept in sync with `ngsw-config.template.json`. -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons&display=block">
<!-- -->
<style id="aio-initial-theme">
@import url("light-theme.css") (prefers-color-scheme: light);
@import url("dark-theme.css") (prefers-color-scheme: dark);
</style>
<link rel="manifest" href="pwa-manifest.json">
<meta name="theme-color" content="#1976d2">
2017-06-15 01:44:15 -04:00
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="translucent">
<script>
// Dynamically, pre-emptively, add `noindex`, which will be removed when the doc is ready and valid
tag = document.createElement('meta'); tag.name = 'robots'; tag.content = 'noindex';
document.head.appendChild(tag);
</script>
<!-- Google Analytics -->
<script>
// Note this is a customised version of the GA tracking snippet
// See the comments below for more info
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g;
~i.name.indexOf('NG_DEFER_BOOTSTRAP') || // only load library if not running e2e tests
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
</script>
<!-- End Google Analytics -->
<script>
// Report fatal errors to Google Analytics
window.onerror = function () {
ga('send', 'exception', { exDescription: formatError.apply(null, arguments), exFatal: true });
function formatError(msg, url, line, col, e) {
var stack;
msg = msg.replace(/^Error: /, '');
fix(docs-infra): correctly handle reported errors (#42883) Error-handling in AIO happens mainly in two places: 1. For errors happening inside the app we have a custom `ErrorHandler` implementation, `ReportingErrorHandler`. `ReportingErrorHandler` passes errors to the default `ErrorHandler` (for them to be logged to the console) and also forwards them to `window.onerror()`. 2. Errors happening outside the app and errors forwarded by `ReportingErrorHandler` are handled by `window.onerror()`, which in turn reports them to Google analytics. Previously, we were making some assumptions (which turned out to be incorrect based on the info captured in Google analytics - see #28106): - `ReportingErrorHandler` assumed that the errors passed to its `handleError()` method would be either strings or `Error` instances. _Apparently, other values (such as `null` or `undefined`) may also be passed._ - `window.onerror()` assumed that if an `Error` instance was passed in, it would always have a stacktrace (i.e. its `stack` property would be defined). _This is not necessarily true, although it is not clear (based on the logs) whether reported errors of this type are caused by `Error` instance with no stacktrace or by non-string error objects which are incorrectly treated as `Error` instances. This commit ensures that all types of error arguments can be handled correctly, including `Error` instances with no stacktrace and other types of objects or primitives. NOTE: PR #42881 is related as it fixes handling `null` and `undefined` arguments in the default `ErrorHandler`. Fixes #28106 PR Close #42883
2021-07-17 07:41:45 -04:00
if (e && e.stack) {
stack = e.stack
// strip the leading "Error: " from the stack trace
.replace(/^Error: /, '')
// strip the message from the stack trace, if present
.replace(msg + '\n', '')
// strip leading spaces
.replace(/^ +/gm, '')
// strip all leading "at " for each frame
.replace(/^at /gm, '')
// replace long urls with just the last segment: `filename:line:column`
.replace(/(?: \(|@)http.+\/([^/)]+)\)?(?:\n|$)/gm, '@$1\n')
// replace "eval code" in Edge
.replace(/ *\(eval code(:\d+:\d+)\)(?:\n|$)/gm, '@???$1\n')
} else {
line = line || '?';
col = col || '?';
stack = url + ':' + line + ':' + col;
}
return (msg + '\n' + stack).substr(0, 150);
}
};
</script>
</head>
<body>
<aio-shell></aio-shell>
<noscript>
2017-06-16 11:07:53 -04:00
<div class="background-sky hero"></div>
<section id="intro" style="text-shadow: 1px 1px #1976d2;">
<div class="hero-logo"></div>
2017-06-16 11:07:53 -04:00
<div class="homepage-container">
<div class="hero-headline">The modern web<br>developer's platform</div>
2017-06-16 11:07:53 -04:00
</div>
</section>
<h2 style="color: red; margin-top: 40px; position: relative; text-align: center; text-shadow: 1px 1px #fafafa; border-top: none;">
<b><i>This website requires JavaScript.</i></b>
</h2>
</noscript>
<!--
Custom Elements polyfills required for browsers that natively support Custom Elements but not
ES2015 modules. (See `custom-elements-es5-polyfills.js` for more info.)
NOTE:
The polyfills here will be loaded before the ones in `polyfills.ts` (including
`@webcomponents/custom-elements`). This is fine, because the polyfills here are only needed on
browsers that natively support Custom Elements, on which `@webcomponents/custom-elements` will
be a no-op (so the order of loading does not matter).
-->
<script src="generated/js/custom-elements-es5-polyfills.js" nomodule></script>
</body>
</html>