finish examples

This commit is contained in:
Rene Haas
2022-11-12 11:33:07 +01:00
parent 350c65e854
commit ec91edfe8c
48 changed files with 1069 additions and 15304 deletions
+5 -30
View File
@@ -1,44 +1,19 @@
import { Component } from '@angular/core';
import type { EventListenerArgs } from 'overlayscrollbars';
@Component({
selector: 'app-root',
template: `
<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center" class="content">
<h1>Welcome to {{ title }}!</h1>
<span style="display: block">{{ title }} app is running!</span>
<overlay-scrollbars style="width: 222px; height: 222px;">
<img
width="300"
alt="Angular Logo"
width="333"
height="333"
alt="Angular logo"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="
/>
</div>
<h2>Here are some links to help you start:</h2>
<div overlay-scrollbars (osUpdated)="onUpdated($event)"></div>
<ul>
<li>
<h2>
<a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a>
</h2>
</li>
<li>
<h2>
<a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a>
</h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
</li>
</ul>
</overlay-scrollbars>
`,
styles: [],
})
export class AppComponent {
title = 'example';
onUpdated([instance, onUpdatedArgs]: EventListenerArgs['updated']) {
// eslint-disable-next-line no-console
console.log(instance, onUpdatedArgs);
}
}
+3 -2
View File
@@ -8,5 +8,6 @@ if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
+18
View File
@@ -1 +1,19 @@
/* You can add global styles to this file, and also import other style files */
@import '~overlayscrollbars/styles/overlayscrollbars.css';
body {
margin: 0;
min-height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body,
app-root {
display: flex;
justify-content: center;
align-items: center;
}