Skip to content
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

Polymorphic classes #895

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

DanielKucal
Copy link

This goal of this change is to allow developers to easily extend the functionality of ngx-chips classes. To achieve it introduces the following things:

  • reduces private accessors
  • passes Injector to the constructor, instead of standalone dependencies
  • introduces functions like onTab() to handle keys events directly
  • splits code into smaller functions
  • fills docs and types


/**
* @name onBlur
*/
@Output() public onBlur: EventEmitter<any> = new EventEmitter();
@Output() public onBlur: EventEmitter<FocusEvent> = new EventEmitter();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may have not used these in order to avoid errors with angular universal 🤔 @DanielKucal thoughts?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think things like those should be polyfilled in the server environment rather than in every project separately, e.g. like here: https://github.com/Angular-RU/angular-universal-starter/blob/master/server.ts#L11
We can eventually add quick polyfills like in tag-input.ts:

const DragEvent = (window as any).DragEvent;

@Gbuomprisco, what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants