self.answers = [{...}]
self.currentAnswer = null
self.onSelectAnswer = function (answer) {
self.currentAnswer.isSelected = true
answer.isSelected = true
self.currentAnswer = answer
}
div(ng-repeat="answer in ctrl.answers" ng-click="ctrl.onSelectAnswer(answer)")
resolve: {
preload: function ($http, $rootScope) {
retun $http.post().then(function (result) {
$rootScope.someData = result.data
}
}
}
response.headers('Content-Type')
response.headers()