<reponame>yannickeboo/Udemy-Hands-On-Auto-DevOps-with-GitLab-CI<filename>auto-devops/public/js/routers/router.js<gh_stars>0/*global Backbone */
var app = app || {};

(function () {
	'use strict';

	// Todo Router
	// ----------
	app.TodoRouter = Backbone.Router.extend({
		routes: {
			'*filter': 'setFilter'
		},

		setFilter: function (param) {
			// Set the current filter to be used
			app.TodoFilter = param || '';

			// Trigger a collection filter event, causing hiding/unhiding
			// of Todo view items
			app.todos.trigger('filter');
		}
	});
})();
