{"id":269075,"date":"2015-11-26T14:20:03","date_gmt":"2015-11-26T11:20:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269075"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269075","title":{"rendered":"AngularJs, \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043f\u043e\u0441\u043e\u0431\u0438\u0435 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e PhoneCat Application"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/github.com\/AndreyKrupskii\/phoneCat\/blob\/master\/img\/maxresdefault.jpg?raw=true\" alt=\"image\"\/><\/p>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0442\u0435\u043c, \u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043d\u0430 AngularJs \u0438 \u0445\u043e\u0447\u0435\u0442 \u0432 \u0441\u0436\u0430\u0442\u044b\u0435 \u0441\u0440\u043e\u043a\u0438 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0441\u043f\u0435\u0448\u0438\u0442\u0435, \u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Google \u0434\u0430\u0432\u043d\u043e \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u043e \u0432\u0430\u0441 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u0439 <a href=\"http:\/\/angular.ru\/tutorial\">\u0443\u0447\u0435\u0431\u043d\u0438\u043a<\/a>.<br \/>  <a name=\"habracut\"><\/a> <br \/>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c, \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u044d\u0442\u043e \u0434\u0435\u043c\u043e <a href=\"http:\/\/andreykrupskii.github.io\/phoneCat\/\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0451\u043c.<\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0441 ajax \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0421\u043e\u0437\u0434\u0430\u0451\u043c index.html \u0438 \u043f\u0438\u0448\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u043d\u0435\u0442 \u043e\u0431\u0449\u0435\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (\u0432\u0435\u0434\u044c \u044d\u0442\u043e \u0438 \u0442\u0430\u043a \u0432\u0441\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e), \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044e:<\/p>\n<p>   \u2014 angular;<br \/>   \u2014 angular-route;<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u0438\u0435:<\/p>\n<pre><code class=\"html\">&lt;html lang=&quot;en&quot; ng-app=&quot;phonecatApp&quot;&gt;   &lt;head&gt;     &lt;meta charset=&quot;utf-8&quot;&gt;     &lt;!-- Template Title --&gt;     &lt;title&gt;PhoneCat App&lt;\/title&gt;     &lt;!-- Custom stylesheet --&gt;     &lt;link href=&quot;style.css&quot; rel=&quot;stylesheet&quot;&gt;     &lt;\/head&gt;   &lt;body ng-controller=&quot;PhoneListCtrl&quot;&gt;     &lt;!-- ====== Menu Section ====== --&gt;     &lt;section id=&quot;menu&quot;&gt;         &lt;div class=&quot;navbar&quot; role=&quot;navigation&quot;&gt;               &lt;ul  class=&quot;nav navbar-nav navbar-right&quot;&gt;                 &lt;li&gt;&lt;a href=&quot;#\/home&quot;&gt;Home&lt;\/a&gt;&lt;\/li&gt;                 &lt;li&gt;&lt;a href=&quot;#\/about&quot;&gt;Description&lt;\/a&gt;&lt;\/li&gt;                 &lt;li&gt;&lt;a href=&quot;#\/contact&quot;&gt;Contact&lt;\/a&gt;&lt;\/li&gt;               &lt;\/ul&gt;         &lt;\/div&gt;     &lt;\/section&gt;     &lt;!-- ====== End Menu Section ====== --&gt;     &lt;!-- ====== Ng-veiw Section ====== --&gt;      &lt;section ng-view id=&quot;search&quot;&gt;&lt;\/section&gt;      &lt;!-- ====== End Ng-veiw Section ====== --&gt;     &lt;!-- Angular JS --&gt;     &lt;script src=&quot;libs\/angular.min.js&quot;&gt;&lt;\/script&gt;     &lt;script src=&quot;libs\/angular-route.min.js&quot;&gt;&lt;\/script&gt;     &lt;!-- Custom JS --&gt;     &lt;script src=&quot;js\/controllers.js&quot;&gt;&lt;\/script&gt;     &lt;script src=&quot;js\/filters.js&quot;&gt;&lt;\/script&gt;     &lt;script src=&quot;js\/main.js&quot;&gt;&lt;\/script&gt;   &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432 \u043f\u0440\u0435\u0442\u044c \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u0432\u0430\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <u>ng-app<\/u>, <u>ng-controller<\/u>, <u>ng-view<\/u>. \u042d\u0442\u043e \u0432\u0441\u0451 AngularJs \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043d\u0438\u0445 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u0441\u0432\u043e\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043a, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, <u>ng-app<\/u> \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 Angular-\u0443 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 <u>ng-controller<\/u> \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <u>ng-view<\/u> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u044b: home.html, about.html, contact.html, phone-detail.html.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043a\u0430\u043a-\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 index.html, \u0442\u0443\u0442 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0433\u0438\u044f AngularJs. \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0430\u0439\u043b controllers.js \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0451\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<pre><code class=\"javascript\">var phonecatApp= angular.module('phonecatApp', ['ngRoute','ngAnimate']); phonecatApp.config(['$routeProvider',function($routeProvider){ \t$routeProvider \t.when('\/',{ \t\ttemplateUrl:&quot;template\/home.html&quot;, \t\tcontroller:&quot;PhoneListCtrl&quot; \t}) \t.when('\/about',{ \t\ttemplateUrl:&quot;template\/about.html&quot;, \t\tcontroller:&quot;AboutCtrl&quot; \t}) \t.when('\/contact',{ \t\ttemplateUrl:&quot;template\/contact.html&quot;, \t\tcontroller:&quot;ContactCtrl&quot; \t}) \t.when('\/phones\/:phoneId',{ \t\ttemplateUrl:&quot;template\/phone-detail.html&quot;, \t\tcontroller:&quot;PhoneDetailCtrl&quot; \t}) \t.otherwise({ \t\tredirectTo: '\/' \t}); }]); phonecatApp.controller('PhoneListCtrl',['$scope','$http','$location', function($scope,$http, $location){ }]); phonecatApp.controller('AboutCtrl',['$scope','$http','$location', function($scope,$http, $location){ }]); phonecatApp.controller('ContactCtrl',['$scope','$http','$location', function($scope,$http, $location){ }]); phonecatApp.controller('PhoneDetailCtrl',['$scope','$http','$location','$routeParams', function($scope,$http, $location, $routeParams){ }]); <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u043e\u0433\u043b\u0430\u0441\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 angular module \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u00abphonecatApp\u00bb \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c config \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0433\u0434\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e $routeProvider \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b (links) \u043a \u043d\u0430\u0448\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u043d\u0438\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b. \u0412 \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0443 \u043d\u0430\u0441 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f.<\/p>\n<p>  \u0418\u0434\u0451\u043c \u0434\u0430\u043b\u044c\u0448\u0435, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b phones.json, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0438\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u043a\u0440\u0430\u0442\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b. \u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u043e\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435, \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e <a href=\"https:\/\/github.com\/angular\/angular-phonecat\/tree\/master\/app\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a> (\u043f\u0430\u043f\u043a\u0438 phones \u0438 img), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430 \u043f\u0440\u043e AngularJs \u043e\u0442 Google. <\/p>\n<p>  \u0418 \u0432\u043e\u0442 \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c home.html. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430 \u0432\u0432\u043e\u0434\u0430 (\u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b) \u0438 \u0446\u0438\u043a\u043b (\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ng-repeat), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u0440\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 phones.json. <\/p>\n<pre><code class=\"html\">&lt;div class=&quot;search-input&quot;&gt;     &lt;input type=&quot;text&quot; placeholder=&quot;Search&quot; ng-model=&quot;query&quot;&gt; &lt;\/div&gt; &lt;div class=&quot;phone-wrap animation&quot; ng-repeat=&quot;phone in phones | filter: query&quot;&gt;     &lt;div class=&quot;phone_img-wrap&quot;&gt;         &lt;img ng-src=&quot;{{phone.imageUrl}}&quot; alt=&quot;{{phone.name}}&quot;&gt;     &lt;\/div&gt;     &lt;h3&gt;{{phone.name}}&lt;\/h3&gt;     &lt;div class=&quot;phone_text-wrap&quot;&gt;         &lt;p class=&quot;phone-text&quot;&gt;{{phone.snippet}}&lt;\/p&gt;     &lt;\/div&gt;     &lt;a class=&quot;btn-see&quot; href=&quot;#\/phones\/{{phone.id}}&quot;&gt;         &lt;p&gt;VIEW&lt;\/p&gt;        &lt;\/a&gt; &lt;\/div&gt; <\/code><\/pre>\n<p>  \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 ng-model \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0432\u0432\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 query, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0432 AngularJs \u0444\u0438\u043b\u044c\u0442\u0440 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u044b\u0435 \u0446\u0438\u043a\u043b\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438 \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u0441\u0435 \u043b\u0438\u0448\u043d\u0435\u0435 (ng-repeat=\u00abphone in phones | filter: query\u00bb).<\/p>\n<p>  \u041d\u043e \u0447\u0442\u043e\u0431 \u0432\u0441\u0451 \u044d\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 http-\u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 &#8216;PhoneListCtrl&#8217;:<\/p>\n<pre><code class=\"javascript\">$http.get('phones\/phones.json').success(function(data,status,headers,config) { \t$scope.phones=data; }); <\/code><\/pre>\n<p>  \u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u043e, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 htttp-\u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 &#8216;PhoneDetailCtrl&#8217;:<\/p>\n<pre><code class=\"javascript\">$http.get('phones\/'+$scope.phoneId+'.json').success(function(data){ \t$scope.phone=data; }) <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u0447\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u0430\u043a\u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043d\u0430 \u043d\u0435\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438:<\/p>\n<pre><code class=\"html\"> &lt;h1&gt;{{phone.name}}&lt;\/h1&gt; <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451! \u041c\u044b \u0441 \u0432\u0430\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432\u0430\u0448\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 single page application \u043d\u0430 AngularJs.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/271765\/\"> http:\/\/habrahabr.ru\/post\/271765\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/github.com\/AndreyKrupskii\/phoneCat\/blob\/master\/img\/maxresdefault.jpg?raw=true\" alt=\"image\"\/><\/p>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0442\u0435\u043c, \u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043d\u0430 AngularJs \u0438 \u0445\u043e\u0447\u0435\u0442 \u0432 \u0441\u0436\u0430\u0442\u044b\u0435 \u0441\u0440\u043e\u043a\u0438 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0441\u043f\u0435\u0448\u0438\u0442\u0435, \u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Google \u0434\u0430\u0432\u043d\u043e \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u043e \u0432\u0430\u0441 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u0439 <a href=\"http:\/\/angular.ru\/tutorial\">\u0443\u0447\u0435\u0431\u043d\u0438\u043a<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-269075","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=269075"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269075\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}