-
Notifications
You must be signed in to change notification settings - Fork 0
Standalone demo app #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d3dcfa2
Standalone demo app
Gramli db2feb0
- fix lint
Gramli 8b2d20e
Update projects/angular-notifier-standalone-demo/src/app/app.html
Gramli d253113
Update projects/angular-notifier-standalone-demo/src/app/app.scss
Gramli f187e99
Update projects/angular-notifier/src/lib/notifier.module.ts
Gramli 310534e
implement missing unit tests
Gramli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
projects/angular-notifier-standalone-demo/src/app/app.config.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core'; | ||
|
|
||
| import { provideNotifier } from 'angular-notifier'; | ||
|
|
||
| export const appConfig: ApplicationConfig = { | ||
| providers: [ | ||
| provideBrowserGlobalErrorListeners(), | ||
| provideNotifier({ | ||
| position: { | ||
| horizontal: { | ||
| position: 'right', | ||
| distance: 12, | ||
| }, | ||
| vertical: { | ||
| position: 'bottom', | ||
| distance: 12, | ||
| gap: 10, | ||
| }, | ||
| }, | ||
| theme: 'primeng', | ||
| }), | ||
| ], | ||
| }; |
66 changes: 66 additions & 0 deletions
66
projects/angular-notifier-standalone-demo/src/app/app.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| <nav class="navbar"> | ||
| <div class="navbar-brand">angular-notifier</div> | ||
| <div class="navbar-icons"> | ||
| <a href="https://github.com/Gramli/angular-notifier" target="_blank" rel="noopener noreferrer" class="icon-link" title="View on GitHub"> | ||
| <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"> | ||
| <path | ||
| d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" | ||
| /> | ||
| </svg> | ||
| </a> | ||
| <a | ||
| href="https://www.npmjs.com/package/gramli-angular-notifier" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| class="icon-link" | ||
| title="View on npm" | ||
| > | ||
| <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"> | ||
| <path | ||
| d="M0 7.334v8h6.666v1.332H12v-1.332h12v-8H0zm6.666 6.664H5.334v-4H3.999v4H1.335V8.667h5.331v5.331zm4 0v1.336H8.001V8.667h5.334v5.332h-2.669v-.001zm12.001 0h-1.33v-4h-1.336v4h-1.335v-4h-1.33v4h-2.671V8.667h8.002v5.331zM10.665 10H12v2.667h-1.335V10z" | ||
| /> | ||
| </svg> | ||
| </a> | ||
| </div> | ||
| </nav> | ||
|
|
||
| <div class="content"> | ||
| <h2>Show notifications</h2> | ||
| <button class="button button--primary" (click)="showNotification('default', 'Good evening, you lovely person!')">Default me!</button> | ||
| <button class="button button--primary" (click)="showNotification('info', 'This library is built on top of Angular 2.')">Info me!</button> | ||
| <button class="button button--primary" (click)="showNotification('success', 'Notification successfully opened.')">Success me!</button> | ||
| <button class="button button--primary" (click)="showNotification('warning', 'Warning! But not an error! Just a warning!')"> | ||
| Warning me! | ||
| </button> | ||
| <button class="button button--primary" (click)="showNotification('error', 'Whoops, something went wrong. Probably.')">Error me!</button> | ||
| <button class="button button--primary" (click)="showCustomNotificationTemplate('info', 'This is a custom notification template')"> | ||
| Custom notification | ||
| </button> | ||
|
|
||
| <h2>Hide notifications</h2> | ||
| <button class="button button--secondary" (click)="hideAllNotifications()">Hide all notifications!</button> | ||
| <button class="button button--secondary" (click)="hideOldestNotification()">Hide oldest notification!</button> | ||
| <button class="button button--secondary" (click)="hideNewestNotification()">Hide newest notification!</button> | ||
|
|
||
| <h2>Show & hide a specific notification</h2> | ||
| <button class="button button--primary" (click)="showSpecificNotification('default', 'Hello, you lovely person!', 'ID_TEST')"> | ||
| Show notification with ID named 'ID_TEST' | ||
| </button> | ||
| <button class="button button--secondary" (click)="hideSpecificNotification('ID_TEST')">Hide notification with ID named 'ID_TEST'</button> | ||
|
|
||
| <div class="tip"> | ||
| <strong>Configuration Tip:</strong> You can play with the configuration, it's located in the | ||
| <code>angular-notifier-demo/src/app/app.module.ts</code> file. | ||
Gramli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </div> | ||
| <div class="tip"> | ||
| <strong>Theme Tip:</strong> Default theme is material, available themes: <strong>material, bootstrap, primeng.</strong> | ||
| </div> | ||
| </div> | ||
|
|
||
| <notifier-container></notifier-container> | ||
|
|
||
| <ng-template #customTemplate let-notification="notification"> | ||
| <div> | ||
| <strong>{{ notification.type }}:</strong> {{ notification.message }} | ||
| </div> | ||
| </ng-template> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.