LemonBlue
5/6/2015 - 3:58 AM

루트 프로바이더 테스트

루트 프로바이더 테스트

	// create the module and name it app
	var app = angular.module('main', ['ngRoute']);
	// configure our routes
	app.config(function($routeProvider) {$routeProvider
			// route for the home page
			.when('/', {
				templateUrl : 'pages/home.html',
				controller  : 'mainController'
			})

			// route for the about page
			.when('/table', {
				templateUrl : 'pages/table.html',
				controller  : 'tableController'
			})

			// route for the contact page
			.when('/contact', {
				templateUrl : 'pages/contact.html',
				controller  : 'contactController'
			});

	});
	// create the controller and inject Angular's $scope
	app.controller('mainController', function($scope) {
		// create a message to display in our view
		$scope.message = '테스트 완료!';
	});

	app.controller('tableController', function($scope) {
		$scope.message = '테이블 페이지 테스트';
	});

	app.controller('contactController', function($scope) {
		$scope.message = '연락처 페이지 테스트';
	});