-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Pipe argument not working #226
Comments
The error you're getting is in the unit test for your pipe ( You can either update the test, or remove it. In both scenarios your issue will be fixed. |
Sorry i can't get you. Can you please share code. I have tried but still its not working. but this same code is working fine in angular quick start app |
I would believe that you created your pipe via If that is true then your spec file looks like this: it('should transform the input', inject([Toggl], (pipe:Toggl) => {
expect(pipe.transform(true)).toBe(null);
})); You will have to update the expect statement to test what value you are supplying versus the result which is returned from your pipe |
okay Brocco thanks |
Hi brocco, i understand it. but js file is created automatically based on ts file right. then why i need to write manually. Please make this process automatically. This will be helpful. |
Well, when you do Then you changed So now you have two options: either you rework |
ok thanks. i will rework. |
Please tell me if it works well for you. There isn't a lot of documentation on Angular 2 unit tests right now and sometimes it's hard to get them to work. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Hi,
I have created custom pipes for filtering data. Normal pipe and custom pipe working fine. But the issue is pipe argument not working.
My custom pipe code is:
My component code is
html code:
<li *ngFor="#item of list | toggl:'completed'">{{item.title}} and {{item.status}}</li>
Output:
Build error
[DiffingTSCompiler]: Typescript found the following errors:
app/pipes/toggle-args/toggle-args.spec.ts (22, 14): Supplied parameters do not match any signature of call target.
Same code I have tried as per the quickstart guide (https://angular.io/docs/ts/latest/quickstart.html) it was working fine. Please solve this issue.
The text was updated successfully, but these errors were encountered: