angular.module("egyApp",['ngRoute']) .config(function($routeProvider) { $routeProvider .when('/egy', { templateUrl: 'templates/egy.html', controller: 'egyCtrl' }) .when('/ketto', { templateUrl: 'templates/ketto.html', controller: 'kettoCtrl' }) .when('/', { templateUrl: 'templates/main.html', controller: 'mainCtrl' }) }) .controller('egyCtrl', function($scope){ $scope.msg = "Működik"; }) .controller('kettoCtrl', function($scope){ $scope.msg = "Ez is működik"; }) .controller('mainCtrl', function($scope){ $scope.msg = "A főoldalon a controll működik"; }) ;