Hi, obviously i did not explain.
import { Component, Pipe, PipeTransform} from '@angular/core';
@Component({
selector: 'app-root',
template: `<div>{{test | aux:'Rossi'}}</div>`
})
export class AppComponent {
test:string = 'test';
constructor(){}
}
@Pipe({name: 'aux'})
export class HelloPipe implements PipeTransform{
transform(nome: number, args: [string]): void {
}
}
OR
import { Component, Pipe} from '@angular/core';
@Component({
selector: 'app-root',
template: `<div>{{test | aux:'Rossi'}}</div>`
})
export class AppComponent {
test:string = 'test';
constructor(){}
}
@Pipe({name: 'aux'})
export class HelloPipe{
transform(nome: number, args: [string]): void {
}
}
where is the difference, if i don't use pipetrasform typescript doesn't
give errors
Tnx
Il giorno lunedì 16 gennaio 2017 06:29:48 UTC+1, Sander Elias ha scritto:
>
> Hi Feof,
>
> context?
> The pipeTransform interface is accepting almost anything. It only enforces
> you to have at least 2 parameters, and you must return something. And those
> are mandatory anyway, so can you show us what is giving you the errors?
>
> Regards
> Sander
>
--
You received this message because you are subscribed to the Google Groups
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.