UNPKG

generator-ngx-rocket

Version:

Extensible Angular 13+ enterprise-grade project generator based on angular-cli with best practices from the community. Includes PWA/Cordova/Electron support, coding guides and more!

83 lines (81 loc) 3.07 kB
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"/> <% if (props.target.includes('web')) { -%> <!-- needs to be right at the top to prevent Chrome from reloading favicon on every route change --> <link rel="icon" type="image/x-icon" href="favicon.ico"/> <% } -%> <title><%= props.appName %></title> <base href="/"/> <% if (props.target.includes('cordova')) { -%> <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/> <meta name="msapplication-tap-highlight" content="no"/> <% } else { -%> <meta name="viewport" content="width=device-width, initial-scale=1"/> <% } -%> <% if (props.target.includes('cordova') || props.pwa) { -%> <meta name="theme-color" content="#4e8ef7"/> <% } -%> <% if (props.pwa) { -%> <link rel="manifest" href="manifest.webmanifest"/> <% } -%> <% if (props.target.includes('web')) { -%> <!-- add to homescreen for ios --> <meta name="apple-mobile-web-app-capable" content="yes"/> <meta name="apple-mobile-web-app-status-bar-style" content="default"/> <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"/> <% } -%> </head> <body> <% if (props.angulartics && props.analyticsProvider === 'ga') { -%> <!-- Google Analytics --> <script> (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;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '<%= props.googleAnalyticsAccount %>', 'auto'); </script> <!-- End Google Analytics --> <% } -%> <% if (props.target.includes('web')) { -%> <!--[if lte IE 11]> <p> You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience. </p> <![endif]--> <noscript> <p> This page requires JavaScript to work properly. Please enable JavaScript in your browser. </p> </noscript> <% } -%> <% if (props.target.includes('cordova')) { -%> <!-- Include Cordova script only when needed --> <script> if (/^app/.test(location.host)) { /** * https://github.com/angular/angular/issues/22509 * Prevent cordova.js 5.2.4+ routing bug **/ window.addEventListener = function () { EventTarget.prototype.addEventListener.apply(this, arguments); }; window.removeEventListener = function () { EventTarget.prototype.removeEventListener.apply(this, arguments); }; document.addEventListener = function () { EventTarget.prototype.addEventListener.apply(this, arguments); }; document.removeEventListener = function () { EventTarget.prototype.removeEventListener.apply(this, arguments); }; document.write('<script src="cordova.js"><\/script>'); } </script> <% } -%> <app-root></app-root> </body> </html>