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

New templating for components having custom content templates #572

Closed
cagataycivici opened this issue Jul 6, 2016 · 0 comments
Closed
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@cagataycivici
Copy link
Member

cagataycivici commented Jul 6, 2016

Some examples are dropdown, autocomplete, listbox where we lose the ability to bind events in angular way so had to do direct dom access which causes bunch of other issues. Instead use the trick at;

http://stackoverflow.com/questions/36730210/binding-events-when-using-a-ngfortemplate-in-angular-2/36732644

Old syntax was;

<p-dropdown [options]="opts">
   <template let-car>
       <li>
        content here
       <li>
   </template>
</p-dropdown>

New syntax should be;

<p-dropdown [options]="opts">
   <template let-car>
        content here
   </template>
</p-dropdown>

So no need for li elements defined by user template, we'll create them internally and use angular bindings, in the old way we had to bind events with native javascript to the wrapper ul element.

This fixes many issues and helps us to do things angular2 way.

List is;

  • Dropdown
  • AutoComplete
  • Listbox
  • PickList
  • OrderList
  • DataList
  • DataScroller
  • Carousel
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jul 6, 2016
@cagataycivici cagataycivici added this to the 1.0.0-beta.10 milestone Jul 6, 2016
@cagataycivici cagataycivici self-assigned this Jul 6, 2016
cagataycivici pushed a commit that referenced this issue Jul 21, 2016
cagataycivici pushed a commit that referenced this issue Jul 21, 2016
cagataycivici pushed a commit that referenced this issue Jul 21, 2016
cagataycivici pushed a commit that referenced this issue Jul 21, 2016
cagataycivici pushed a commit that referenced this issue Jul 21, 2016
cagataycivici pushed a commit that referenced this issue Jul 21, 2016
@cagataycivici cagataycivici changed the title Rewrite input components with custom template New templating for components having custom content templates Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

1 participant