Closed martinmicunda closed 9 years ago
No, but you can add your own custom matchers. Look at lib/util.js
for example matchers.
@OverZealous
I tried use follow matcher:
matchers: [/(<img\s.*?data-src=["'])(.+?)(["'].*?>)/gi]
with this example:
<img ng-src="../../images/{{::employee.avatar}}" >
but it doesn't work because cdnizer
doesn't find any fileInfo
see your index.js.
Basically ../../images/{{::employee.avatar}}
is not valid url address for cdnizer
so it never replace this url (Angular add employee.avatar
to url during bootstrapping). Is there any way that cdnizer
can replace this url even in cases that fileInfo
is undefined?
You have to specify the file regexes yourself. You need a pattern that matches your angular pattern.
A better option, probably, would be to move the logic into an angular directive or a filter, and have that use the right path, rather than try to match relative paths. Dynamic content isn't exactly the intended use for cdnizer.
Hi,
I have something like this in my app but it doesn't seems
cdnizer
replace path when I am usingng-src
. Does cdnizer supportng-src
? Thanks