Answer the question
In order to leave comments, you need to log in
Angular: how to get executable code out of base?
How to execute the code inserted by Angular?
according to the instructions i have to do this:
app.controller('PageCtrl', function($scope, $http, $routeParams){
$scope.page = null;
$scope.slug = $routeParams.slug;
$http.get('yandex.ru/index.php/pages/'+$scope.slug)
.success(function(response){
document.title = pretitle + ' - ' + response[0].title;
//alert(JSON.stringify(response[0]));
$scope.page = response[0];
});
});
<script charset="utf-8" type="text/javascript">
...
//Допустим alert('this');
<script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question