Hi, could you tell me how to receive data not from the local server where the json file is located, but from the external one. $ http.get changed to jsonp does not help
<script> var CupApp = angular.module('CupApp', []); CupApp.controller('CupCtrl', function ($scope, $http){ $http.get('cup.json').success(function(data) { $scope.cups = data; }); }); I enclose the full code
<!doctype html> <html ng-app="CupApp"> <head> <meta charset="utf-8"> <title>Главная</title> <meta name="author" content="Бородин Дмитрий"> <link href="Безымянный1.css" rel="stylesheet"> <link href="Rating.css" rel="stylesheet"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script> <script> var CupApp = angular.module('CupApp', []); CupApp.controller('CupCtrl', function ($scope, $http){ $http.get('http://json.onlydota.ru/test.html').success(function(data) { $scope.cups = data; }); }); </script> </head> <body ng-controller="CupCtrl"> <div id="container"> <div id="wb_Shape1" style="position:absolute;left:0px;top:51px;width:800px;height:1100px;filter:alpha(opacity=60);opacity:0.60;z-index:0;"> <img src="images/img0001.png" id="Shape1" alt="" style="width:800px;height:1100px;"></div> <div id="wb_Image5" style="position:absolute;left:7px;top:97px;width:251px;height:37px;z-index:1;"> <img src="images/admos-logo-master.png" id="Image5" alt=""></div> <div id="Html1" style="position:absolute;left:9px;top:180px;width:778px;height:957px;z-index:2"> <h2>Топ в компании</h2> <table class="table table-striped"> <tr> <th>Место</th> <th>Менеджер</th> <th>Балы</th> </tr> <tr ng-repeat="cup in cups | orderBy: 'code.length' | filter:{ doc:'top' }"> <td>{{cup.code}}</td> <td>{{cup.name}}</td> <td>{{cup.score}}</td> </tr> </table> </div> <div id="wb_CssMenu2" style="position:absolute;left:304px;top:80px;width:483px;height:70px;text-align:center;z-index:3;"> <ul> <li class="firstmain"><a href="./index.html" target="_self" title="Как это работает">Как это работает</a> </li> <li><a class="withsubmenu active" href="./Rating.html" target="_self" title="Рейтинги">Рейтинги</a> <ul> <li class="firstitem"><a class="active" href="./Rating.html" target="_self" title="ТОП в компании">ТОП в компании</a> </li> <li><a href="./Sobitiya.html" target="_self" title="События">События</a> </li> <li><a href="./Vstrechi.html" target="_self" title="Встречи">Встречи</a> </li> <li><a href="./Old.html" target="_self" title="Счета текущим клиентам">Счета текущим клиентам</a> </li> <li><a href="./New.html" target="_self" title="Счета новым клиентам">Счета новым клиентам</a> </li> <li class="lastitem"><a href="./Pay.html" target="_self" title="Оплата счетов">Оплата счетов</a> </li> </ul> </li> <li><a href="./Rules.html" target="_self" title="Правила">Правила</a> </li> </ul> </div> </div> </body> </html>