@nhoctaneker wrote:
Resolving Data Form Controller .state('student.profile', { url: '/profile', authenticate: true, roles: ['student'], views: { 'menuContent': { templateUrl: 'modules/students/profile/update/profile-update.html', controller: 'StudentProfileUpdateCtrl', }}, resolve: { grades: function(gradeService) { return gradeService.getByCountry().then(function(data) { return data; }); } } })
Question : Why i used this code . I see button back when i go this state
http://prntscr.com/9fj3f7Resolving Data Form Controller
IF i used this code
.state('student.profile', {
url: '/profile',
authenticate: true,
roles: ['student'],
views: {
'menuContent': {
templateUrl: 'modules/students/profile/update/profile-update.html',
controller: 'StudentProfileUpdateCtrl',
}}
})And in my controller i but this code
gradeService.getByCountry().then(function(data) {
$scope.grade = data;
});I got this button
http://prntscr.com/9fj373 in my header
Posts: 1
Participants: 1