Answer the question
In order to leave comments, you need to log in
Is it nice to accept data like this in Angular?
Post.query({name: $stateParams.name}, function (res) {
$scope.post = res[0];
});
Answer the question
In order to leave comments, you need to log in
Да, только используйте controllersAs синтаксис, а не пишите напрямую в scope.
// EDIT
И, да, Post.query должен возвращать Promise.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question