Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

FilterProvider error with 1.3.3 ( fine in 1.3.2 ) #10110

Closed
dehru opened this issue Nov 18, 2014 · 7 comments
Closed

FilterProvider error with 1.3.3 ( fine in 1.3.2 ) #10110

dehru opened this issue Nov 18, 2014 · 7 comments

Comments

@dehru
Copy link

dehru commented Nov 18, 2014

Hello,

I have upgraded my app to 1.3.3 and see different behavior compared to 1.3.2 with regards to filters. Our filters are named with a 'dot' in them like this.

angular.module('emc-ui').filter('emcui.Lowernospace', function(){...});

And we use them like this.

{{'HELLO WORLD' | emcui.Lowernospace}}

This works fine in 1.3.2, but in 1.3.3 I get this error:

Error: [$injector:unpr] Unknown provider: emcuiFilterProvider <- emcuiFilter

However, if I remove the 'emcui.' from the filter and just call it 'Lowernospace' then it works fine with 1.3.3.

So my guess is that somehow the lookup of filters with dots in their name is a new issue to 1.3.3.

@gkalpak
Copy link
Member

gkalpak commented Nov 18, 2014

This has been (briefly) discussed in #10054 and it seems like a won't fix (atm at least).

@pkozlowski-opensource
Copy link
Member

We should add this one to the breaking changes section.

@jbedard
Copy link
Collaborator

jbedard commented Nov 18, 2014

I'm guessing fbad280 broke this? The fixes from that commit also aren't in the release notes...

@pkozlowski-opensource
Copy link
Member

@jbedard yes, I think fbad280 is the one that introduced the change. While it is a breaking change in the sense that it breaks people's code I'm not sure it was ever the intention to support filters with dots in their name. Anyway, I think we should mention it somehow in the changelog, but I don't think we should support filters with dots.

@jbedard
Copy link
Collaborator

jbedard commented Nov 18, 2014

I agree it shouldn't be fixed, I'd say it was a bug that it worked previously. It should also be mentioned in the changelog like you said, but while that is being added to the changelog it would be nice if the fixes from fbad280 were also added...

@Narretz
Copy link
Contributor

Narretz commented Nov 18, 2014

We should also mention in the filter docs / guide that filters should not have periods or other special chars in them.

@dehru
Copy link
Author

dehru commented Nov 19, 2014

Thanks guys for the responses. We will change our filter names to not have special characters.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants