{"id":278410,"date":"2016-04-15T21:10:04","date_gmt":"2016-04-15T17:10:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=278410"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=278410","title":{"rendered":"Angular 2 Beta, \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u00ab\u0422\u0443\u0440 \u0433\u0435\u0440\u043e\u0435\u0432\u00bb \u0447\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"<br \/>\n<h2>\u041d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u0435\u0440\u043e\u0435\u0432<\/h2>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u0435\u0440\u043e\u0435\u0432. \u041c\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0422\u0443\u0440 \u0433\u0435\u0440\u043e\u0435\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0433\u0435\u0440\u043e\u044f, \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0435\u043c.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p><a href=\"https:\/\/angular.io\/resources\/live-examples\/toh-2\/ts\/plnkr.html\">\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0430\u0441\u0442\u044c 2<\/a><\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0417\u0430\u0442\u0435\u043c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d. <\/p>\n<p>  <\/p>\n<h3>\u0413\u0434\u0435 \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0422\u0443\u0440\u0430 \u0433\u0435\u0440\u043e\u0435\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <a href=\"https:\/\/habrahabr.ru\/post\/281190\/\">\u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c<\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u0432\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u043d\u0430\u0437\u0430\u0434.<\/p>\n<p>  <\/p>\n<h4>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  <\/p>\n<p>\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 TypeScript, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u0438 \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0448 web-\u0441\u0435\u0440\u0432\u0435\u0440. \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e, \u043d\u0430\u0431\u0440\u0430\u0432 <\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">    npm start<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c, \u043f\u043e\u043a\u0430 \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0422\u0443\u0440 \u0433\u0435\u0440\u043e\u0435\u0432.<\/p>\n<p>  <\/p>\n<h3>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0438\u0445 \u0433\u0435\u0440\u043e\u0435\u0432<\/h3>\n<p>  <\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u0435\u0440\u043e\u0435\u0432<\/h4>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 \u0434\u0435\u0441\u044f\u0442\u0438 \u0433\u0435\u0440\u043e\u0435\u0432 \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 <code>app.component.ts<\/code>.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (\u041c\u0430\u0441\u0441\u0438\u0432 \u0433\u0435\u0440\u043e\u0435\u0432)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">    let HEROES: Hero[] = [       { &quot;id&quot;: 11, &quot;name&quot;: &quot;Mr. Nice&quot; },       { &quot;id&quot;: 12, &quot;name&quot;: &quot;Narco&quot; },       { &quot;id&quot;: 13, &quot;name&quot;: &quot;Bombasto&quot; },       { &quot;id&quot;: 14, &quot;name&quot;: &quot;Celeritas&quot; },       { &quot;id&quot;: 15, &quot;name&quot;: &quot;Magneta&quot; },       { &quot;id&quot;: 16, &quot;name&quot;: &quot;RubberMan&quot; },       { &quot;id&quot;: 17, &quot;name&quot;: &quot;Dynama&quot; },       { &quot;id&quot;: 18, &quot;name&quot;: &quot;Dr IQ&quot; },       { &quot;id&quot;: 19, &quot;name&quot;: &quot;Magma&quot; },       { &quot;id&quot;: 20, &quot;name&quot;: &quot;Tornado&quot; }     ];<\/code><\/pre>\n<p>  <\/p>\n<p><code>HEROES<\/code> \u2014 \u043c\u0430\u0441\u0441\u0438\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 <code>Hero<\/code>, \u043a\u043b\u0430\u0441\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u041c\u044b, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432 \u0438\u0437 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0448\u0430\u0433\u0438, \u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0433\u0435\u0440\u043e\u0435\u0432 \u0438\u0437 \u043c\u043e\u043a-\u043e\u0431\u044a\u0435\u043a\u0442\u0430 (\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435).<\/p>\n<p>  <\/p>\n<h4>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u0435\u0440\u043e\u0435\u0432<\/h4>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0432 <code>AppComponent<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0433\u0435\u0440\u043e\u0435\u0432 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u2014 \u043c\u0430\u0441\u0441\u0438\u0432 \u0433\u0435\u0440\u043e\u0435\u0432)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">    public heroes = HEROES;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0442\u0438\u043f \u0434\u043b\u044f <code>heroes<\/code>. TypeScript \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>HEROES<\/code>.<\/p>\n<p>  <\/p>\n<blockquote><p>\u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432 \u0437\u0434\u0435\u0441\u044c, \u0432 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041d\u043e \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0433\u0435\u0440\u043e\u0435\u0432 \u0438\u0437 web-\u0441\u043b\u0443\u0436\u0431\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p><\/blockquote>\n<p>  <\/p>\n<h4>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0433\u0435\u0440\u043e\u0435\u0432 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435<\/h4>\n<p>  <\/p>\n<p>\u041d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>heroes<\/code>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u0445. \u041c\u044b \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u0443\u0441\u043e\u043a HTML \u043f\u043e\u0434 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c, \u0432\u044b\u0448\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0433\u0435\u0440\u043e\u0435.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (\u0428\u0430\u0431\u043b\u043e\u043d \u0433\u0435\u0440\u043e\u0435\u0432)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"html\">    &lt;h2&gt;My Heroes&lt;\/h2&gt;     &lt;ul class=&quot;heroes&quot;&gt;       &lt;li&gt;         &lt;!-- each hero goes here --&gt;       &lt;\/li&gt;     &lt;\/ul&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0438\u043c\u0438 \u0433\u0435\u0440\u043e\u044f\u043c\u0438.<\/p>\n<p>  <\/p>\n<h4>\u0412\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u0433\u0435\u0440\u043e\u0435\u0432 \u0441 ngFor<\/h4>\n<p>  <\/p>\n<p>\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0433\u0435\u0440\u043e\u0435\u0432 \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u0441 \u043d\u0430\u0448\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e, \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0433\u0435\u0440\u043e\u0435\u0432 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0449\u044c Angular, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c:<br \/>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0442\u0435\u0433 <code>&lt;li&gt;<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 <code>*ngFor<\/code>.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (ngFor)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"html\">    &lt;li *ngFor=&quot;#hero of heroes&quot;&gt;<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>*<em>\u0412\u0435\u0434\u0443\u0449\u0430\u044f \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430 (`<\/em><code>) \u043f\u0435\u0440\u0435\u0434<\/code>ngFor` \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430.**<\/p><\/blockquote>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0444\u0438\u043a\u0441 <code>*<\/code> \u0434\u043b\u044f <code>ngFor<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;li&gt;<\/code> \u0438 \u0435\u0433\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u0430\u0441\u0442\u0435\u0440-\u0448\u0430\u0431\u043b\u043e\u043d.<\/p>\n<p>  <\/p>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>ngFor<\/code> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0443 <code>heroes<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0440\u043d\u0443\u043b\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>AppComponent.heroes<\/code>, \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u0445 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043a\u0441\u0442 \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445, \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u044b\u0439 <code>ngFor<\/code>, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442: &quot;\u0432\u043e\u0437\u044c\u043c\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 <code>heroes<\/code>, \u0441\u043e\u0445\u0440\u0430\u043d\u0438 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>hero<\/code>, \u0438 \u0441\u0434\u0435\u043b\u0430\u0439 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430&quot;.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0444\u0438\u043a\u0441 <code>#<\/code> \u043f\u0435\u0440\u0435\u0434 <code>hero<\/code> \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0433\u0435\u0440\u043e\u044f \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u0417\u0430\u0442\u0435\u043c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0433\u0435\u0440\u043e\u044f.<\/p>\n<p>  <\/p>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e <code>ngFor<\/code> \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0432 \u0433\u043b\u0430\u0432\u0430\u0445 <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/guide\/displaying-data.html#ngFor\">\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a> \u0438 <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/guide\/template-syntax.html#ngFor\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u0442\u044d\u0433\u0430\u043c\u0438 <code>&lt;li&gt;<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <code>hero<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0433\u0435\u0440\u043e\u044f.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (ngFor template)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"html\">    &lt;li *ngFor=&quot;#hero of heroes&quot;&gt;       &lt;span class=&quot;badge&quot;&gt;{{hero.id}}&lt;\/span&gt; {{hero.name}}     &lt;\/li&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u0438\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432!<\/p>\n<p>  <\/p>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439 \u043d\u0430\u0448\u0438\u043c \u0433\u0435\u0440\u043e\u044f\u043c<\/h4>\n<p>  <\/p>\n<p>\u041d\u0430\u0448 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043a\u0443\u0447\u043d\u043e. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043f\u043e\u043d\u0438\u043c\u0430\u043b, \u043a\u0430\u043a\u043e\u0439 \u0433\u0435\u0440\u043e\u0439 \u0432\u044b\u0431\u0440\u0430\u043d, \u0430 \u043d\u0430\u0434 \u043a\u0430\u043a\u0438\u043c \u0433\u0435\u0440\u043e\u0435\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0443\u0440\u0441\u043e\u0440.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0442\u0438\u043b\u0438 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443. \u041f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code>styles<\/code> \u0432 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0435 <code>@Component<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 CSS \u043a\u043b\u0430\u0441\u0441\u044b:<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439)<\/strong><\/p>\n<p>  <\/p>\n<pre><code>    styles:[`       .selected {         background-color: #CFD8DC !important;         color: white;       }       .heroes {         margin: 0 0 2em 0;         list-style-type: none;         padding: 0;         width: 15em;       }       .heroes li {         cursor: pointer;         position: relative;         left: 0;         background-color: #EEE;         margin: .5em;         padding: .3em 0;         height: 1.6em;         border-radius: 4px;       }       .heroes li.selected:hover {         background-color: #BBD8DC !important;         color: white;       }       .heroes li:hover {         color: #607D8B;         background-color: #DDD;         left: .1em;       }       .heroes .text {         position: relative;         top: -3px;       }       .heroes .badge {         display: inline-block;         font-size: small;         color: white;         padding: 0.8em 0.7em 0 0.7em;         background-color: #607D8B;         line-height: 1em;         position: relative;         left: -1px;         top: -4px;         height: 1.8em;         margin-right: .8em;         border-radius: 4px 0 0 4px;       }     `]<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c `-\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u0441\u0442\u0438\u043b\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443, \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448\u0438 \u0441\u0442\u0438\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a <code>AppComponent<\/code> \u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 &quot;\u0443\u0442\u0435\u043a\u0430\u0442\u044c&quot; \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 HTML.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0448 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u0435\u0440\u043e\u0435\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (\u0421\u0442\u0438\u043b\u0438 \u0434\u043b\u044f \u0433\u0435\u0440\u043e\u0435\u0432)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"html\">    &lt;h2&gt;My Heroes&lt;\/h2&gt;     &lt;ul class=&quot;heroes&quot;&gt;       &lt;li *ngFor=&quot;#hero of heroes&quot;&gt;         &lt;span class=&quot;badge&quot;&gt;{{hero.id}}&lt;\/span&gt; {{hero.name}}       &lt;\/li&gt;     &lt;\/ul&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u0435\u0439! \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0437\u0434\u0435\u0441\u044c, \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u043e\u0449\u0435 \u043a\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u0435. \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0432\u0441\u0435, \u043a\u0430\u043a \u0435\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<h3>\u0412\u044b\u0431\u043e\u0440 \u0433\u0435\u0440\u043e\u044f<\/h3>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u0433\u0435\u0440\u043e\u0435. \u0421\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432 \u0438 \u043e\u0434\u0438\u043d \u0433\u0435\u0440\u043e\u0439 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u041c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0431\u0440\u0430\u043b \u0433\u0435\u0440\u043e\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0435, \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0433\u0435\u0440\u043e\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u042d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d UI \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043a\u0430\u043a &quot;Master-Detail&quot; (\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u043a &quot;\u0433\u043b\u0430\u0432\u043d\u044b\u0439-\u043f\u043e\u0434\u0447\u0438\u043d\u0435\u043d\u043d\u044b\u0439&quot;, \u043d\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f &quot;Master\/Detail&quot;). \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, Master \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432, \u0430 Detail \u2014 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f.<br \/>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043c Master \u0441 Detail \u0447\u0435\u0440\u0435\u0437 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#8216;selectedHero&#8217;, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c \u043a\u043b\u0438\u043a\u0430 \u043d\u0430 \u0433\u0435\u0440\u043e\u0435 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435.<\/p>\n<p>  <\/p>\n<h4>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u043a\u043b\u0438\u043a\u0430 (\u0449\u0435\u043b\u0447\u043a\u0430 \u043c\u044b\u0448\u0438)<\/h4>\n<p>  <\/p>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u043c <code>&lt;li&gt;<\/code>, \u0432\u0441\u0442\u0430\u0432\u0438\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a\u043b\u0438\u043a\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f Angular.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (\u0417\u0430\u0445\u0432\u0430\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a\u043b\u0438\u043a\u0430)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"html\">    &lt;li *ngFor=&quot;#hero of heroes&quot; (click)=&quot;onSelect(hero)&quot;&gt;       &lt;span class=&quot;badge&quot;&gt;{{hero.id}}&lt;\/span&gt; {{hero.name}}     &lt;\/li&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">    (click)=&quot;onSelect(hero)&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043a\u043e\u0431\u043a\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;li&gt;<\/code> \u0446\u0435\u043b\u044c\u044e \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a\u043b\u0438\u043a\u0430. \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>onSelect()<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 <code>AppComponent<\/code>, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <code>hero<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u042d\u0442\u043e \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>hero<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432 <code>ngFor<\/code>.<\/p>\n<p>  <\/p>\n<blockquote><p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u0433\u043b\u0430\u0432\u0430\u0445 <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/guide\/user-input.html\">\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0432\u0432\u043e\u0434<\/a> \u0438 <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/guide\/template-syntax.html#event-binding\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/a>.<\/p><\/blockquote>\n<p>  <\/p>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043a\u043b\u0438\u043a\u0430<\/h4>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043e \u043a \u043c\u0435\u0442\u043e\u0434\u0443 <code>onSelect<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443. \u0427\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434? \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e &quot;\u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0433\u0435\u0440\u043e\u0439&quot; \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0442\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0436\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0447\u043d\u0435\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0435.<\/p>\n<p>  <\/p>\n<h4>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f<\/h4>\n<p>  <\/p>\n<p>\u041d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>hero<\/code> \u0432 <code>AppComponent<\/code>. <strong>\u0417\u0430\u043c\u0435\u043d\u0438\u043c<\/strong> \u0435\u0433\u043e \u043d\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>selectedHero<\/code>:<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (selectedHero)<\/strong><\/p>\n<p>  <\/p>\n<pre><code>    selectedHero: Hero;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0433\u0435\u0440\u043e\u0439 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u0430\u043c \u043d\u0435 \u0432\u044b\u0431\u0435\u0440\u0435\u0442 \u0433\u0435\u0440\u043e\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>selectedHero<\/code>, \u043a\u0430\u043a \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0441 <code>hero<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <code>onSelect<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>selectedHero<\/code> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>hero<\/code>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u043b\u0438\u043a\u043d\u0443\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (onSelect)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">    onSelect(hero: Hero) { this.selectedHero = hero; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435. \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0442\u0430\u0440\u043e\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code>hero<\/code>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a \u043d\u043e\u0432\u043e\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code>selectedHero<\/code>.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043a selectedHero&#8217;s)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"html\">    &lt;h2&gt;{{selectedHero.name}} details!&lt;\/h2&gt;     &lt;div&gt;&lt;label&gt;id: &lt;\/label&gt;{{selectedHero.id}}&lt;\/div&gt;     &lt;div&gt;         &lt;label&gt;name: &lt;\/label&gt;         &lt;input [(ngModel)]=&quot;selectedHero.name&quot; placeholder=&quot;name&quot;\/&gt;     &lt;\/div&gt;<\/code><\/pre>\n<p>  <\/p>\n<h4>\u0421\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u0443\u0441\u0442\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 ngIf<\/h4>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432, \u043d\u043e \u0433\u0435\u0440\u043e\u0439 \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d. <code>selectedHero<\/code> \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u043d <code>undefined<\/code>. \u0412\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code>    EXCEPTION: TypeError: Cannot read property 'name' of undefined in [null]<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u043c\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c <code>selectedHero.name<\/code> \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>name<\/code> \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>selectedHero<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0440\u0435\u0448\u0438\u043c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0443\u0431\u0440\u0430\u0432 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0433\u0435\u0440\u043e\u0435 \u0438\u0437 DOM \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0433\u0435\u0440\u043e\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u043d.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043e\u0431\u0435\u0440\u043d\u0443\u043b\u0438 HTML, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0433\u0435\u0440\u043e\u0435, \u0432 <code>&lt;div&gt;<\/code>. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 <code>ngIf<\/code> \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0435\u0439 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>selectedHero<\/code> \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (ngIf)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"html\">    &lt;div *ngIf=&quot;selectedHero&quot;&gt;       &lt;h2&gt;{{selectedHero.name}} details!&lt;\/h2&gt;       &lt;div&gt;&lt;label&gt;id: &lt;\/label&gt;{{selectedHero.id}}&lt;\/div&gt;       &lt;div&gt;         &lt;label&gt;name: &lt;\/label&gt;         &lt;input [(ngModel)]=&quot;selectedHero.name&quot; placeholder=&quot;name&quot;\/&gt;       &lt;\/div&gt;     &lt;\/div&gt;<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>*<em>\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u0435\u0434\u0443\u0449\u0430\u044f \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430 (<\/em>) \u043f\u0435\u0440\u0435\u0434 &#8216;ngIf&#8217; \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430.**<\/p><\/blockquote>\n<p>  <\/p>\n<p>\u041f\u043e\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>selectedHero<\/code> \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430, \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>ngIf<\/code> \u0443\u0434\u0430\u043b\u044f\u0435\u0442 HTML \u0441 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0433\u0435\u0440\u043e\u0435 \u0438\u0437 DOM. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0433\u0435\u0440\u043e\u0435, \u043d\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u043e\u0438\u0442 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0433\u0435\u0440\u043e\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>selectedHero<\/code> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439, \u0430 <code>ngIf<\/code> \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0433\u0435\u0440\u043e\u0435 \u0432 DOM \u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438.<\/p>\n<p>  <\/p>\n<blockquote><p><code>ngIf<\/code> \u0438 `ngFor&#8217; \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f &quot;\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u043c\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u043c\u0438&quot;, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0447\u0430\u0441\u0442\u0435\u0439 DOM. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u043d\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a Angular \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 DOM.<\/p><\/blockquote>\n<p>  <\/p>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e ngIf, ngFor \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0432 \u0433\u043b\u0430\u0432\u0430\u0445 <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/guide\/structural-directives.html\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b<\/a> \u0438 <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/guide\/template-syntax.html#event-binding\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0438 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432, \u043d\u043e \u0431\u0435\u0437 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0433\u0435\u0440\u043e\u0435. <code>NgIf<\/code> \u0445\u0440\u0430\u043d\u0438\u0442 \u0435\u0435 \u0432\u043d\u0435 DOM, \u043f\u043e\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>selectedHero<\/code> \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u0433\u0435\u0440\u043e\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0433\u0435\u0440\u043e\u0435. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u043b\u0438.<\/p>\n<p>  <\/p>\n<h4>\u0421\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/h4>\n<p>  <\/p>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0433\u0435\u0440\u043e\u0435 \u043f\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u043e\u043c, \u043d\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0439\u0442\u0438 \u044d\u0442\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0432\u044b\u0448\u0435. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u043f\u0443\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 CSS <code>selected<\/code> \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 <code>&lt;li&gt;<\/code> \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c Magenta \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0433\u0435\u0440\u043e\u0435\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0437\u0434\u0435\u0441\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/angular.io\/resources\/images\/devguide\/toh\/heroes-list-selected.png\" alt=\"heroes-list-selected\"\/><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 <code>class<\/code>, \u0447\u0442\u043e\u0431\u044b \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441 <code>selected<\/code>. \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e <code>selectedHero<\/code> \u0438 <code>hero<\/code>.<br \/>  \u041a\u043b\u044e\u0447 \u044d\u0442\u043e \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 CSS (<code>selected<\/code>). \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u0438\u043d\u043d\u043e (<code>true<\/code>), \u0435\u0441\u043b\u0438 \u043e\u0431\u0430 \u0433\u0435\u0440\u043e\u044f \u0441\u043e\u0432\u043f\u0430\u043b\u0438 \u0438 \u043b\u043e\u0436\u044c (<code>false<\/code>) \u0438\u043d\u0430\u0447\u0435. \u041c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c <em>&quot;\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441 <code>selected<\/code>, \u0435\u0441\u043b\u0438 \u0433\u0435\u0440\u043e\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a&quot;<\/em>.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 CSS \u043a\u043b\u0430\u0441\u0441\u0430)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">    [class.selected]=&quot;hero === selectedHero&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 <code>class.selected<\/code> \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 (<code>[]<\/code>). \u042d\u0442\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0434\u0443\u0442 \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043e\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>hero === selectedHero<\/code>) \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code>class<\/code>.<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts (\u0421\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f)<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"html\">    &lt;li *ngFor=&quot;#hero of heroes&quot;       [class.selected]=&quot;hero === selectedHero&quot;       (click)=&quot;onSelect(hero)&quot;&gt;       &lt;span class=&quot;badge&quot;&gt;{{hero.id}}&lt;\/span&gt; {{hero.name}}     &lt;\/li&gt;<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0423\u0437\u043d\u0430\u0439\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/guide\/template-syntax.html#property-binding\">\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432<\/a> \u043c\u043e\u0436\u043d\u043e \u0432 \u0433\u043b\u0430\u0432\u0435 \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p><\/blockquote>\n<p>  <\/p>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0433\u0435\u0440\u043e\u044f Magenta, \u0438 \u0432\u044b\u0431\u043e\u0440 \u0447\u0435\u0442\u043a\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0446\u0432\u0435\u0442\u043e\u043c \u0444\u043e\u043d\u0430.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/angular.io\/resources\/images\/devguide\/toh\/heroes-list-1.png\" alt=\"heroes-list\"\/><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f \u0438 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>app.component.ts<\/code> \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442:<\/p>\n<p>  <\/p>\n<p><strong>app.component.ts<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">import {Component} from 'angular2\/core';     export class Hero {       id: number;       name: string;     }     @Component({       selector: 'my-app',       template:`         &lt;h1&gt;{{title}}&lt;\/h1&gt;         &lt;h2&gt;My Heroes&lt;\/h2&gt;         &lt;ul class=&quot;heroes&quot;&gt;           &lt;li *ngFor=&quot;#hero of heroes&quot;             [class.selected]=&quot;hero === selectedHero&quot;             (click)=&quot;onSelect(hero)&quot;&gt;             &lt;span class=&quot;badge&quot;&gt;{{hero.id}}&lt;\/span&gt; {{hero.name}}           &lt;\/li&gt;         &lt;\/ul&gt;         &lt;div *ngIf=&quot;selectedHero&quot;&gt;           &lt;h2&gt;{{selectedHero.name}} details!&lt;\/h2&gt;           &lt;div&gt;&lt;label&gt;id: &lt;\/label&gt;{{selectedHero.id}}&lt;\/div&gt;           &lt;div&gt;             &lt;label&gt;name: &lt;\/label&gt;             &lt;input [(ngModel)]=&quot;selectedHero.name&quot; placeholder=&quot;name&quot;\/&gt;           &lt;\/div&gt;         &lt;\/div&gt;       `,       styles:[`         .selected {           background-color: #CFD8DC !important;           color: white;         }         .heroes {           margin: 0 0 2em 0;           list-style-type: none;           padding: 0;           width: 15em;         }         .heroes li {           cursor: pointer;           position: relative;           left: 0;           background-color: #EEE;           margin: .5em;           padding: .3em 0;           height: 1.6em;           border-radius: 4px;         }         .heroes li.selected:hover {           background-color: #BBD8DC !important;           color: white;         }         .heroes li:hover {           color: #607D8B;           background-color: #DDD;           left: .1em;         }         .heroes .text {           position: relative;           top: -3px;         }         .heroes .badge {           display: inline-block;           font-size: small;           color: white;           padding: 0.8em 0.7em 0 0.7em;           background-color: #607D8B;           line-height: 1em;           position: relative;           left: -1px;           top: -4px;           height: 1.8em;           margin-right: .8em;           border-radius: 4px 0 0 4px;         }       `]     })     export class AppComponent {       title = 'Tour of Heroes';       heroes = HEROES;       selectedHero: Hero;       onSelect(hero: Hero) { this.selectedHero = hero; }     }     var HEROES: Hero[] = [       { &quot;id&quot;: 11, &quot;name&quot;: &quot;Mr. Nice&quot; },       { &quot;id&quot;: 12, &quot;name&quot;: &quot;Narco&quot; },       { &quot;id&quot;: 13, &quot;name&quot;: &quot;Bombasto&quot; },       { &quot;id&quot;: 14, &quot;name&quot;: &quot;Celeritas&quot; },       { &quot;id&quot;: 15, &quot;name&quot;: &quot;Magneta&quot; },       { &quot;id&quot;: 16, &quot;name&quot;: &quot;RubberMan&quot; },       { &quot;id&quot;: 17, &quot;name&quot;: &quot;Dynama&quot; },       { &quot;id&quot;: 18, &quot;name&quot;: &quot;Dr IQ&quot; },       { &quot;id&quot;: 19, &quot;name&quot;: &quot;Magma&quot; },       { &quot;id&quot;: 20, &quot;name&quot;: &quot;Tornado&quot; }     ];<\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u0443\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0440\u043e\u0448\u043b\u0438<\/h3>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0442\u043e, \u0447\u0435\u0433\u043e \u043c\u044b \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041d\u0430\u0448 \u0422\u0443\u0440 \u0433\u0435\u0440\u043e\u0435\u0432 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432.<\/li>\n<li>\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u0430 \u0433\u0435\u0440\u043e\u044f \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0433\u0435\u0440\u043e\u0435.<\/li>\n<li>\u041c\u044b \u0443\u0437\u043d\u0430\u043b\u0438, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <code>ngIf<\/code> \u0438 <code>ngFor<\/code>, \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<p><a href=\"https:\/\/angular.io\/resources\/live-examples\/toh-2\/ts\/plnkr.html\">\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0430\u0441\u0442\u044c 2<\/a><\/p>\n<p>  <\/p>\n<h4>\u041f\u0440\u0435\u0434\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u0443\u0442\u044c<\/h4>\n<p>  <\/p>\n<p>\u041d\u0430\u0448 \u0422\u0443\u0440 \u0433\u0435\u0440\u043e\u0435\u0432 \u0432\u044b\u0440\u043e\u0441, \u043d\u043e \u0434\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0435\u0449\u0435 \u0434\u0430\u043b\u0435\u043a\u043e. \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043f\u043e\u0434\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435. \u041c\u044b \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0432 <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/tutorial\/toh-pt3.html\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u0435<\/a>.<\/p>\n<p>  <\/p>\n<blockquote>\n<h3>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433<\/h3>\n<p>  <\/p>\n<p><a href=\"https:\/\/angular.io\/docs\/ts\/latest\/tutorial\/toh-pt3.html\">\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/a><\/p>\n<\/blockquote>\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=\"https:\/\/habrahabr.ru\/post\/281727\/\"> https:\/\/habrahabr.ru\/post\/281727\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h2>\u041d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u0435\u0440\u043e\u0435\u0432<\/h2>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u0435\u0440\u043e\u0435\u0432. \u041c\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0422\u0443\u0440 \u0433\u0435\u0440\u043e\u0435\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u0440\u043e\u0435\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0433\u0435\u0440\u043e\u044f, \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0435\u043c.<\/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-278410","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278410","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=278410"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278410\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}