1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

json pipe not found in Angular 18

Discussão em 'Angular' iniciado por Luis José Sánchez, Outubro 7, 2024.

  1. In a clean project in Angular 18 the pipe "json" is not working.

    import {Component} from '@angular/core';
    import {bootstrapApplication} from '@angular/platform-browser';

    @Component({
    selector: 'app-root',
    standalone: true,
    template: `
    Hello world!
    <p>{{ person | json }}</p>
    `,
    })
    export class PlaygroundComponent {
    person = {
    name: "Alan",
    position: "full-stack developer",
    salary: 2000
    };
    }

    bootstrapApplication(PlaygroundComponent);


    I get the following error:

    ✘ [ERROR] NG8004: No pipe found with name 'json'. [plugin angular-compiler]


    This code worked perfectly in previews versions of Angular.

    There are no examples of json pipe in the Angular 18 official docs.

    Continue reading...

Compartilhe esta Página