/**
 * Created by fran lopez on 8/12/15.
 */

    /**
     * New CommonJS module configuration block, inject the "$routeProvider"
     * object, and use it to define routes for film trailers AngularJS
     * module.
     */

    /**
     * The "angular.module()" method is used to grab the example module and
     * execute the "config()" method to create a new configuration block. Then,
     * the dependency injection is applied to inject the "$routeProvider" object
     * to the configuration function, and the "$routeProvider.when()" method to
     * define a new route. The first argument of the "$routeProvider.when()"
     * method is the route's URL, and the second one is an options object, where
     * was defined a template's URL.
     */

    angular.module('filmTrailers').config(['$routeProvider',
        function($routeProvider) {
            $routeProvider.
                when('/filmTrailers/:filmId', {
                    templateUrl: 'filmTrailers/views/viewListOfFilmTrailers.client.view.html'
                });
        }
    ]);