Last active
August 30, 2016 00:16
-
-
Save alecklandgraf/b7e0c9ad9964c0f2f8842b6071b9ecce to your computer and use it in GitHub Desktop.
Profile Component with Routing
This file contains 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
const Component = { | |
template: `...`, | |
bindings: { | |
userData: '<' | |
} | |
}; | |
angular | |
.module('App.pages.profile', [uiRouter, meServiceModule]) | |
.component('profile', Component) | |
.config(($stateProvider, $urlRouterProvider) => { | |
'ngInject'; | |
$stateProvider | |
.state('profile', { | |
url: '/profile', | |
component: 'profile', | |
resolve: { | |
userData: meService => meService.fetchMe() | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment