/**
 * Created by fran lopez on 26/01/16.
 */

    /**
     * AngularJS filter. Filters in AngularJS are used to filter
     * information from models in the different views.
     *
     * There is a few situations, when a DOM attribute must be
     * formatted following patterns.
     *
     * For example, the iFrames used to show tv serie trailers in a
     * view, use an attribute called "src", to define the trailer
     * source. The dynamic source must be formatted to show the
     * tv serie trailer correctly.
     */

    angular.module('tvSerieTrailers').filter('filterIFramesForTVSerieTrailers',
        ['$sce', function ($sce) {
                return function (url) {
                    return $sce.trustAsResourceUrl(url);
                };
            }
        ]
    );