0

My requirement is to get price of a stock and show it beside the stockname in brackets. Example: Ford Motors(Price:542)

To place the price beside stock name I built a custom filter and inside filter I am making ajax call and getting the price.

For this requirement I searched google and found some code which uses angular 1.0.0rc4 version and it works fine but when I try to implement the same with angular 1.5.8 it doesnt work. Please help me to make it work with 1.5.8 version.

1.5.8 version

1.0.0 version

2
  • 1
    A filter is not the appropriate place to execute asynchronous requests. The purpose of a filter is to format a value for display. If you're looking to create a reusable piece of functionality, I would suggest you create a component that executes this logic. Commented Oct 24, 2016 at 12:11
  • I am curious to know whats making the same code to work with one version and fail with other version. Any details on whats making the code to fail with v1.5.8? Commented Oct 25, 2016 at 5:40

1 Answer 1

-1

There was a significant change in angular 1.5.8 version. The AngularJS team are trying to make the migration to AngularJS 2 easier. You can checkout the migration guide here:

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.