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

p-breadcrumb is not working properly if Observable<string[]> is provided in <li *ngFor> #355

Closed
joe380 opened this issue May 13, 2016 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@joe380
Copy link

joe380 commented May 13, 2016

Then using p-breadcrum with a simple array of elements where x is string[]:
<p-breadcrumb><ul><li *ngFor="let p of x"><span>{{p}}</span></li></ul></p-breadcrumb>
all

  • elements have proper classes and also the first li[fa-home] is generated

    Change the x variable to Observable<string[]> and the first first li[fa-home] is missing and all other

  • elements are missing classes + also the characters '>' between each string are missing.

  • @cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label May 14, 2016
    @cagataycivici cagataycivici added this to the 1.0.0-beta.6 milestone May 14, 2016
    @cagataycivici cagataycivici self-assigned this May 14, 2016
    @cagataycivici
    Copy link
    Member

    Breadcrumb is reimplemented as a native component in beta6 and this is fixed as a result. There is a new menu model api so instead of generating markup yourself, the component will do it and update it according to changes.

    <p-breadcrumb [model]="items"></p-breadcrumb>
    export class BreadcrumbDemo implements OnInit {
    
        private items: MenuItem[];
    
        ngOnInit() {
            this.items = [];
            this.items.push({label:'Categories'});
            this.items.push({label:'Sports'});
            this.items.push({label:'Football'});
            this.items.push({label:'Countries'});
            this.items.push({label:'Spain'});
            this.items.push({label:'F.C. Barcelona'});
            this.items.push({label:'Squad'});
            this.items.push({label:'Lionel Messi', url: 'https://en.wikipedia.org/wiki/Lionel_Messi'});
        }
    }

    @cagataycivici cagataycivici changed the title p-breadcrum is not working properly if Observable<string[]> is provided in <li *ngFor> p-breadcrumd is not working properly if Observable<string[]> is provided in <li *ngFor> May 17, 2016
    @cagataycivici cagataycivici changed the title p-breadcrumd is not working properly if Observable<string[]> is provided in <li *ngFor> p-breadcrumb is not working properly if Observable<string[]> is provided in <li *ngFor> May 17, 2016
    atretyak1985 pushed a commit to Nanitor/primeng that referenced this issue Jul 18, 2020
    …ements
    
    [NNTR-303] Design improvements for issue dashboard.
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants