Answer the question
In order to leave comments, you need to log in
Why is the view not being rendered in the Angular module?
Hello! I'm new to angularjs and I can't figure out what I'm doing wrong.
Actually, I use ui-router as a routing. And there is a problem out of the blue.
1. In the controller I use this code. $scope.title = 'TEST';
I go to such a page using ui-sref='main'. Everything works well.
2. In the controller I add ajax request
function simple() {
var deferred = $.defer();
$http.get()... // какой-то элементарный запрос
return deferred.promise;
}
// далее уже делаю что-то вроде
simple().then(function() {
$scope.title = 'TEST';
});
Answer the question
In order to leave comments, you need to log in
What to do?
1) Syntax met. Why not use $scope? How many tutorials I watch - $scope and $scope everywhere?
2) Understood
3) The code is now confusing. I'm ready to figure it out myself. In addition, you pointed out many errors at once. This is much more important. But I'll try to show you the code. It's already holidays, and only at night I will write)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question