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

    /**
     * New CommonJS module configuration block, inject the "$routeProvider"
     * object, and use it to define routes for tv series 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('tvSeries').config(['$routeProvider',
        function($routeProvider) {
            $routeProvider.
                when('/tvSeries', {
                    templateUrl: 'tvSeries/views/viewSearchesForTVSeries.client.view.html'
                }).
                when('/tvSeries/tvSeriesByTitle', {
                    templateUrl: 'tvSeries/views/viewToFindTVSeriesByTitle.client.view.html',
                    css: 'tvSeries/css/tvSeries.client.styles.css'
                }).
                when('/tvSeries/tvSeriesByYear', {
                    templateUrl: 'tvSeries/views/viewToFindTVSeriesByYear.client.view.html',
                    css: 'tvSeries/css/tvSeries.client.styles.css'
                }).
                when('/tvSeries/tvSeriesByGenre', {
                    templateUrl: 'tvSeries/views/viewToFindTVSeriesByGenre.client.view.html',
                    css: 'tvSeries/css/tvSeries.client.styles.css'
                }).
                when('/tvSeries/tvSeriesByProtagonist', {
                    templateUrl: 'tvSeries/views/viewToFindTVSeriesByProtagonist.client.view.html',
                    css: 'tvSeries/css/tvSeries.client.styles.css'
                }).
                when('/tvSeries/tvSeriesByDirector', {
                    templateUrl: 'tvSeries/views/viewToFindTVSeriesByDirector.client.view.html',
                    css: 'tvSeries/css/tvSeries.client.styles.css'
                }).
                when('/tvSeries/tvSeriesByRating', {
                    templateUrl: 'tvSeries/views/viewToFindTVSeriesByRating.client.view.html',
                    css: 'tvSeries/css/tvSeries.client.styles.css'
                }).
                when('/tvSeries/listOfTVSeries/:searchType/:patternToSearch', {
                    templateUrl: 'tvSeries/views/viewListOfTVSeries.client.view.html'
                }).
                when('/tvSeries/:TVSerieId', {
                    templateUrl: 'tvSeries/views/viewTVSerieDetails.client.view.html',
                    css: 'tvSeries/css/tvSeries.client.styles.css'
                });
        }
    ]);