Created
June 13, 2015 22:05
-
-
Save jonatasfreitasv/52ba83ce4b900579fcb7 to your computer and use it in GitHub Desktop.
Route
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
angular | |
.module('controlaCarApp.route', []) | |
.config(['$stateProvider', '$urlRouterProvider', config]); | |
function config($stateProvider, $urlRouterProvider) { | |
$urlRouterProvider.otherwise('/'); | |
$stateProvider | |
.state('root', { | |
abstract: true, | |
views: { | |
'@': {}, | |
'header@': {templateUrl: 'views/header.html'}, | |
'footer@': {templateUrl: 'views/footer.html'} | |
} | |
}) | |
.state('main', { | |
url: '/', | |
parent: 'root', | |
views: { | |
'@': { templateUrl: 'views/main.html' } | |
}, | |
controller: function($scope){ | |
console.log('TESTE'); | |
$scope.aa = 'JONATAS FREITAS'; | |
} | |
}); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment