D
D
Daeamon2016-01-12 12:37:38
Angular
Daeamon, 2016-01-12 12:37:38

When loading via $resource rss feed using google rss reader api chrome loads endlessly what to do?

I upload via $resource rssku, there are images in it, for some reason these images also start to be loaded and are loaded endlessly, which blunts the browser. How can I make it load only rss and images not load?
Code part:

feedModule.factory('FeedLoader', function ($resource) {
    			return $resource('http://ajax.googleapis.com/ajax/services/feed/load', {}, {
    				fetch: { method: 'JSONP', params: {v: '1.0', callback: 'JSON_CALLBACK', timeout: 1000} }
    			});
    		})

In chrome, this crap is going on:
753a808785e7471eb4aa89069ea05ca4.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daeamon, 2016-01-12
@Daeamon

нашел проблему. я чтобы очистить html от тэгов создавал dom элемент и брал его innerText. Соответственно поэтому грузились картинки. Заменил regexp.

function strip(html)
        {

           var regex = /(<([^>]+)>)/ig;
           html = html.replace(regex, "");
           return html.replace(regex, "");
        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question