{"id":291962,"date":"2019-07-11T15:01:16","date_gmt":"2019-07-11T15:01:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=291962"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=291962","title":{"rendered":"\u041e\u0431\u0445\u043e\u0434 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u0435\u0439 Angular \u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Angular \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u0418\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043a\u043e\u0432\u0430\u0440\u043d\u043e\u0435 \u00ab\u043f\u043e\u0447\u0442\u0438\u00bb \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0433\u0443\u0431\u0438\u0442 \u0432\u0440\u0435\u043c\u044f, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043e\u0431\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0438\u043b\u0438 \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u0438\u043b\u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/459304\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bl\/sj\/vq\/blsjvqaqs4fhtnqmscwlw7lx0zs.jpeg\"><\/a><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c, \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u043e\u0432\u0435\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 Angular-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u044f\u0445 Angular, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0435\u043c\u0443 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u043c\u0443) \u0434\u043e\u0432\u0435\u043b\u043e\u0441\u044c \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#3AC1EF\">\u21161. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438, \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/font><\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u0432\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 Angular \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 Angular. \u0417\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e! \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<pre><code class=\"javascript\">&lt;span awesomeTooltip=\"'Tooltip text'\"&gt; &lt;\/span&gt;<\/code><\/pre>\n<p>  \u0412\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u2026 \u0418 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0412\u044b, \u043a\u0430\u043a \u043b\u044e\u0431\u043e\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442, \u0437\u0430\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u0435\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 Chrome. \u0418 \u043d\u0438\u0447\u0435\u0433\u043e \u0442\u0430\u043c \u043d\u0435 \u0432\u0438\u0434\u0438\u0442\u0435. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 Angular \u0445\u0440\u0430\u043d\u0438\u0442 \u043c\u043e\u043b\u0447\u0430\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u043e\u0442\u043e\u043c \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0432\u0435\u0442\u043b\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u0430 \u0438\u0437 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438.<\/p>\n<pre><code class=\"javascript\">&lt;span [awesomeTooltip]=\"'Tooltip text'\"&gt; &lt;\/span&gt;<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u043f\u043e\u0442\u0435\u0440\u044f\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/532\/4aa\/95f\/5324aa95f7aa2d0d1a20e74f93953eb1.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0412\u043e\u0442 \u0432 \u0447\u0451\u043c \u0434\u0435\u043b\u043e: \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u043e\u0439<\/font><\/i><\/p>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430: \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Angular.<br \/>  \u041e\u0442\u0441\u044e\u0434\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0432\u0430\u0436\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e: \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0431\u0435\u0437 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a.<\/p>\n<p>  \u041f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/stackblitz.com\/edit\/angular-f4wesb?file=src\/app\/app.component.html\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2><font color=\"#3AC1EF\">\u21162. ViewChild \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 undefined<\/font><\/h2>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 Angular.<\/p>\n<pre><code class=\"javascript\">&lt;input type=\"text\" name=\"fname\" #inputTag&gt;<\/code><\/pre>\n<p>  \u0412\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 RxJS <a href=\"https:\/\/rxjs.dev\/api\/index\/function\/fromEvent\">fromEvent<\/a>, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430 Angular <code>ViewChild<\/code>:<\/p>\n<pre><code class=\"javascript\">class SomeComponent implements AfterViewInit {  \u00a0\u00a0\u00a0\u00a0@ViewChild('inputTag') inputTag: ElementRef;  \u00a0\u00a0\u00a0\u00a0ngAfterViewInit(){ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const input$ = fromEvent(this.inputTag.nativeElement, 'keyUp') \u00a0\u00a0\u00a0\u00a0} ...\u00a0\u00a0\u00a0\u00a0 }<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 RxJS <code>fromEvent<\/code>, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u043e\u0442\u043e\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0432\u043e\u0434\u0438\u043c\u044b\u0435 \u0432 \u043f\u043e\u043b\u0435.<br \/>  \u0418\u0441\u043f\u044b\u0442\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/4f0\/504\/558\/4f0504558e9daf73a87d78da7f00fb04.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u041e\u0448\u0438\u0431\u043a\u0430<\/font><\/i><\/p>\n<p>  \u0427\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c?<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e: \u0435\u0441\u043b\u0438 <code>ViewChild<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>undefined<\/code> \u2014 \u043f\u043e\u0438\u0449\u0438\u0442\u0435 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 <code>*ngIf<\/code>.<\/p>\n<pre><code class=\"javascript\">&lt;div *ngIf=\"someCondition\"&gt; \u00a0\u00a0\u00a0\u00a0&lt;input type=\"text\" name=\"fname\" #inputTag&gt; &lt;\/div&gt;<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043e\u043d \u2014 \u0432\u0438\u043d\u043e\u0432\u043d\u0438\u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043d\u0451\u043c \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 \u0438\u043b\u0438 <code>ng-template<\/code> \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<br \/>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u21161<\/font><\/h3>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0440\u044b\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0438 <code>ViewChild<\/code> \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0435\u0433\u043e \u0432 \u0445\u0443\u043a\u0435 <code>ngAfterViewInit<\/code>.<\/p>\n<pre><code class=\"javascript\">&lt;div [hidden]=\"!someCondition\"&gt; \u00a0\u00a0\u00a0\u00a0&lt;input type=\"text\" name=\"fname\" #inputTag&gt; &lt;\/div&gt;<\/code><\/pre>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u21162<\/font><\/h3>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u043e\u0432.<\/p>\n<pre><code class=\"javascript\">class SomeComponent { \u00a0\u00a0 \u00a0\u00a0@ViewChild('inputTag') set inputTag(input: ElementRef|null) { \u00a0\u00a0\u00a0\u00a0if(!input) return; \u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0this.doSomething(input); \u00a0\u00a0}  \u00a0\u00a0doSomething(input) { \u00a0\u00a0\u00a0\u00a0const input$ = keysfromEvent(input.nativeElement, 'keyup'); \u00a0\u00a0\u00a0\u00a0... \u00a0\u00a0} }<\/code><\/pre>\n<p>  \u0422\u0443\u0442, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e Angular \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code>inputTag<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u043e\u0442\u043e\u043a \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0432 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430.<\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0430\u0440\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435:<\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/453584\/\">\u0417\u0434\u0435\u0441\u044c<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b <code>ViewChild<\/code> \u0432 Angular 8 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 RxJs \u2014 \u0432\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/www.udemy.com\/hands-on-rxjs-for-web-development\/\">\u044d\u0442\u043e\u0442<\/a> \u0432\u0438\u0434\u0435\u043e\u043a\u0443\u0440\u0441.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u21163. \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u043f\u0438\u0441\u043a\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e *ngFor (\u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 DOM)<\/font><\/h2>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u0432\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432. \u0412\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0451 \u043a \u0441\u043f\u0438\u0441\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b Angular <code>*ngFor<\/code>.<\/p>\n<pre><code class=\"javascript\">&lt;div *ngFor=\"let item of itemsList; let i = index;\" \u00a0\u00a0\u00a0\u00a0\u00a0[customScroll] \u00a0\u00a0\u00a0\u00a0\u00a0&gt; \u00a0\u00a0&lt;p *ngFor=\"let item of items\" class=\"list-item\"&gt;{{item}}&lt;\/p&gt; \u00a0\u00a0\u00a0\u00a0 &lt;\/div&gt;<\/code><\/pre>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435 <code>scrollDirective.update<\/code> \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435.<\/p>\n<p>  \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0445\u0443\u043a\u0430 <code>ngOnChanges<\/code>:<\/p>\n<pre><code class=\"javascript\">class SomeComponent implements OnChanges { \u00a0\u00a0@Input() itemsList = []; \u00a0\u00a0 \u00a0\u00a0@ViewChild(CustomScrollDirective) scroll: CustomScrollDirective;  \u00a0\u00a0ngOnChanges(changes) { \u00a0\u00a0\u00a0\u00a0if (changes.itemsList) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.scroll.update(); \u00a0\u00a0\u00a0\u00a0} \u00a0\u00a0} ... }<\/code><\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430, \u0442\u0443\u0442 \u043c\u044b \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u0425\u0443\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0435\u0440\u0435\u0441\u0447\u0451\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a <code>*ngFor<\/code> \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443?<\/p>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 3 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0448\u0430\u0433\u0430:<\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0428\u0430\u0433 \u21161<\/font><\/h3>\n<p>  \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0442\u0443\u0434\u0430, \u0433\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f <code>*ngFor<\/code> (<code>#listItems<\/code>).<\/p>\n<pre><code class=\"javascript\">&lt;div [customScroll]&gt; \u00a0\u00a0\u00a0\u00a0&lt;p *ngFor=\"let item of items\" #listItems&gt;{{item}}&lt;\/p&gt; &lt;\/div&gt;<\/code><\/pre>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0428\u0430\u0433 \u21162<\/font><\/h3>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u0442\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430 Angular <code>ViewChildren<\/code>. \u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0442\u0438\u043f\u0430 <code>QueryList<\/code>.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0428\u0430\u0433 \u21163<\/font><\/h3>\n<p>  \u041a\u043b\u0430\u0441\u0441 <code>QueryList<\/code> \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <a href=\"https:\/\/github.com\/angular\/angular\/blob\/master\/packages\/core\/src\/linker\/query_list.ts#L48\">changes<\/a>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0434\u0430\u0451\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a.<\/p>\n<pre><code class=\"javascript\">class SomeComponent implements AfterViewInit { \u00a0\u00a0@Input() itemsList = []; \u00a0\u00a0 \u00a0\u00a0@ViewChild(CustomScrollDirective) scroll: CustomScrollDirective; \u00a0\u00a0@ViewChildren('listItems') listItems: QueryList&lt;any&gt;; \u00a0\u00a0private sub: Subscription; \u00a0\u00a0 \u00a0\u00a0ngAfterViewInit() { \u00a0\u00a0\u00a0\u00a0this.sub = this.listItems.changes.subscribe(() =&gt; this.scroll.update()) \u00a0\u00a0} ... }<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0435\u043d\u0430. <a href=\"https:\/\/stackblitz.com\/edit\/ngx-perfect-scrollbar-ngfor-update?file=src%2Fapp%2Fapp.component.ts\">\u0417\u0434\u0435\u0441\u044c<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c.<\/p>\n<h2><font color=\"#3AC1EF\">\u21164. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 ActivatedRoute.queryParam, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/font><\/h2>\n<p>  \u041f\u043e\u043d\u044f\u0442\u044c \u0441\u0443\u0442\u044c \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434.<\/p>\n<pre><code class=\"javascript\">\/\/ app-routing.module.ts const routes: Routes = [ \u00a0\u00a0\u00a0\u00a0{path: '', redirectTo: '\/home', pathMatch: 'full'}, \u00a0\u00a0\u00a0\u00a0{path: 'home', component: HomeComponent}, \u00a0\u00a0]; \u00a0\u00a0 \u00a0\u00a0@NgModule({ \u00a0\u00a0\u00a0\u00a0imports: [RouterModule.forRoot(routes)], \/\/ \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 #1 \u00a0\u00a0\u00a0\u00a0exports: [RouterModule] \u00a0\u00a0}) \u00a0\u00a0export class AppRoutingModule { } \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0\/\/app.module.ts \u00a0\u00a0@NgModule({ \u00a0\u00a0\u00a0\u00a0... \u00a0\u00a0\u00a0\u00a0bootstrap: [AppComponent] \/\/ \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 #2 \u00a0\u00a0}) \u00a0\u00a0export class AppModule { } \u00a0\u00a0 \u00a0\u00a0\/\/ app.component.html \u00a0\u00a0&lt;router-outlet&gt;&lt;\/router-outlet&gt; \/\/ \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 #3 \u00a0\u00a0 \u00a0\u00a0 \u00a0\u00a0\/\/ app.component.ts \u00a0\u00a0export class AppComponent implements OnInit { \u00a0\u00a0\u00a0\u00a0title = 'QueryTest'; \u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0constructor(private route: ActivatedRoute) { } \u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0ngOnInit() { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.route.queryParams \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.subscribe(params =&gt; { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0console.log('saveToken', params); \/\/ \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 #4 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}); \u00a0\u00a0\u00a0\u00a0} \u00a0\u00a0}<\/code><\/pre>\n<p>  \u041a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432\u0438\u0434\u0430 <code>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 #x<\/code>. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445:<\/p>\n<ol>\n<li>\u0412 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0442\u0443\u0434\u0430 <code>RouterModule<\/code>. \u041c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0442\u0430\u043a, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432 URL \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043c\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>\/home<\/code>.<\/li>\n<li>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435 <code>AppComponent<\/code>.<\/li>\n<li><code>AppComponent<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>&lt;router-outlet&gt;<\/code> \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430.<\/li>\n<li>\u0422\u0435\u043f\u0435\u0440\u044c \u2014 \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <code>queryParams<\/code> \u0434\u043b\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0438\u0437 URL<\/li>\n<\/ol>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0442\u0430\u043a\u043e\u0439 URL:<\/p>\n<pre><code class=\"javascript\">https:\/\/localhost:4400\/home?accessToken=someTokenSequence<\/code><\/pre>\n<p>  \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code>queryParams<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"javascript\">{accessToken: \u2018someTokenSequence\u2019}<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/29f\/aef\/ae5\/29faefae56d8e01e314cb6eab9fae6dc.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/font><\/i><\/p>\n<p>  \u0422\u0443\u0442 \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438, \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f\u2026<\/p>\n<p>  \u041f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435\u0441\u044c \u043a \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435 \u043a\u043e\u043f\u0438\u0438 \u044d\u043a\u0440\u0430\u043d\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 <code>queryParams<\/code> \u0432\u044b\u0434\u0430\u0451\u0442\u0441\u044f \u0434\u0432\u0430\u0436\u0434\u044b. \u041f\u0435\u0440\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u044b\u043c, \u043e\u043d \u0432\u044b\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0445\u043e\u0434\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430 Angular. \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 <code>{accessToken: \u2018someTokenSequence\u2019}<\/code>).<\/p>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432 URL \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0442\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0438\u0447\u0435\u0433\u043e. \u0422\u043e \u0435\u0441\u0442\u044c \u2014 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0434\u0430\u0447\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u043e\u0436\u0435 \u043f\u0443\u0441\u0442\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0433 \u0431\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432\u044b\u0434\u0430\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e16\/1b7\/8be\/e161b78be5051b1ee9f9ca1ec2c9d31a.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0412\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0435 \u0432\u044b\u0434\u0430\u0451\u0442\u0441\u044f<\/font><\/i><\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0442\u043e \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 URL \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  \u041a\u0430\u043a \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443? \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c RxJs. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <code>ActivatedRoute.queryParams<\/code> \u0434\u0432\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u2014 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0428\u0430\u0433 \u21161<\/font><\/h3>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, <code>paramsInUrl$<\/code>, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>queryParams<\/code> \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u044b\u043c:<\/p>\n<pre><code class=\"javascript\">export class AppComponent implements OnInit {  \u00a0\u00a0\u00a0\u00a0constructor(private route: ActivatedRoute, \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0private locationService: Location) { \u00a0\u00a0\u00a0\u00a0}  \u00a0\u00a0\u00a0\u00a0ngOnInit() { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u041e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0418 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0432\u044b\u0434\u0430\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const paramsInUrl$ = this.route.queryParams.pipe( \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0filter(params =&gt; Object.keys(params).length &gt; 0) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0);  \u00a0\u00a0\u00a0\u00a0\u00a0...  \u00a0\u00a0\u00a0\u00a0} }<\/code><\/pre>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0428\u0430\u0433 \u21162<\/font><\/h3>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, <code>noParamsInUrl$<\/code>, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 URL \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code class=\"javascript\">export class AppComponent implements OnInit { \u00a0\u00a0\u00a0\u00a0title = 'QueryTest';  \u00a0\u00a0\u00a0\u00a0constructor(private route: ActivatedRoute, \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0private locationService: Location) { \u00a0\u00a0\u00a0\u00a0}  \u00a0\u00a0\u00a0\u00a0ngOnInit() { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0412\u044b\u0434\u0430\u0451\u0442 \u043f\u0443\u0441\u0442\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 URL \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const noParamsInUrl$ = this.route.queryParams.pipe( \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0filter(() =&gt; !this.locationService.path().includes('?')), \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map(() =&gt; ({})) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0... \u00a0\u00a0\u00a0\u00a0} }<\/code><\/pre>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0428\u0430\u0433 \u21163<\/font><\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 RxJS <a href=\"https:\/\/rxjs.dev\/api\/index\/function\/merge\">merge<\/a>:<\/p>\n<pre><code class=\"javascript\">export class AppComponent implements OnInit { \u00a0\u00a0\u00a0\u00a0title = 'QueryTest';  \u00a0\u00a0\u00a0\u00a0constructor(private route: ActivatedRoute, \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0private locationService: Location) { \u00a0\u00a0\u00a0\u00a0}  \u00a0\u00a0\u00a0\u00a0ngOnInit() { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u041e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0418 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0432\u044b\u0434\u0430\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const paramsInUrl$ = this.route.queryParams.pipe( \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0filter(params =&gt; Object.keys(params).length &gt; 0) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0412\u044b\u0434\u0430\u0451\u0442 \u043f\u0443\u0441\u0442\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 URL \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const noParamsInUrl$ = this.route.queryParams.pipe( \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0filter(() =&gt; !this.locationService.path().includes('?')), \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map(() =&gt; ({})) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const params$ = merge(paramsInUrl$, noParamsInUrl$);  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0params$.subscribe(params =&gt; { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0console.log('saveToken', params); \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0});  \u00a0\u00a0\u00a0\u00a0} }<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 <code>param$<\/code> \u0432\u044b\u0434\u0430\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u2014 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u043b\u0438 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 <code>queryParams<\/code> (\u0432\u044b\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430) \u0438\u043b\u0438 \u043d\u0435\u0442 (\u0432\u044b\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442).<\/p>\n<p>  \u041f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/stackblitz.com\/edit\/angular-8-communicating-between-components-ruc8mf?file=app%2Fapp.component.ts\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2><font color=\"#3AC1EF\">\u21165. \u041c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446<\/font><\/h2>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u0432\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0435\u043a\u0438\u0435 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"javascript\">\/\/ home.component.html &lt;div class=\"wrapper\" (mousemove)=\"mouseCoordinates = {x: $event.x, y: $event.y}\"&gt;  \u00a0\u00a0&lt;div *ngFor=\"let item of items\"&gt; \u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0&lt;span&gt;{{formatItem(item)}}&lt;\/span&gt;  \u00a0\u00a0&lt;\/div&gt;  &lt;\/div&gt;  {{mouseCoordinates | json}}    \/\/ home.component.ts export class HomeComponent {  \u00a0\u00a0\u00a0\u00a0items = [1, 2, 3, 4, 5, 6];  \u00a0\u00a0\u00a0\u00a0mouseCoordinates = {};  \u00a0\u00a0\u00a0\u00a0formatItem(item) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u0442\u044f\u0436\u0451\u043b\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const t = Array.apply(null, Array(5)).map(() =&gt; 1);\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0console.log('formatItem'); \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return item + '%'; \u00a0\u00a0\u00a0\u00a0}  }<\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0440\u0435\u0448\u0430\u0435\u0442 \u0434\u0432\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ol>\n<li>\u041e\u043d \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043e\u043d \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u043c\u0435\u0442\u043e\u0434 <code>formatItem<\/code>.<\/li>\n<li>\u041e\u043d \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043c\u044b\u0448\u0438 (\u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e).<\/li>\n<\/ol>\n<p>  \u0412\u044b \u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0443\u0442 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u043b\u044e\u0441\u0442\u0438 \u0432\u0441\u0435 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0445\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043a\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/015\/97d\/621\/01597d6210a35f37a8030702c0b71753.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u041c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 formatItem \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440<\/font><\/i><\/p>\n<p>  \u0412 \u0447\u0451\u043c \u0436\u0435 \u0434\u0435\u043b\u043e? \u0410 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 Angular \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d, \u043e\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438 \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>formatItem<\/code>). \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0435\u0441\u043b\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u044f\u0436\u0451\u043b\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0438 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<p>  \u041a\u0430\u043a \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c? \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0432 <code>formatItem<\/code>, \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0438 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<pre><code class=\"javascript\">\/\/ home.component.html &lt;div class=\"wrapper\" (mousemove)=\"mouseCoordinates = {x: $event.x, y: $event.y}\"&gt; \u00a0\u00a0&lt;div *ngFor=\"let item of displayedItems\"&gt; \u00a0\u00a0\u00a0\u00a0&lt;span&gt;{{item}}&lt;\/span&gt; \u00a0\u00a0&lt;\/div&gt; &lt;\/div&gt;  {{mouseCoordinates | json}}   \/\/ home.component.ts @Component({ \u00a0\u00a0\u00a0\u00a0selector: 'app-home', \u00a0\u00a0\u00a0\u00a0templateUrl: '.\/home.component.html', \u00a0\u00a0\u00a0\u00a0styleUrls: ['.\/home.component.sass'] }) export class HomeComponent implements OnInit {  \u00a0\u00a0\u00a0\u00a0items = [1, 2, 3, 4, 5, 6]; \u00a0\u00a0\u00a0\u00a0displayedItems = [];  \u00a0\u00a0\u00a0\u00a0mouseCoordinates = {};  \u00a0\u00a0\u00a0\u00a0ngOnInit() { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.displayedItems = this.items.map((item) =&gt; this.formatItem(item)); \u00a0\u00a0\u00a0\u00a0}  \u00a0\u00a0\u00a0\u00a0formatItem(item) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0console.log('formatItem'); \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0const t = Array.apply(null, Array(5)).map(() =&gt; 1); \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return item + '%'; \u00a0\u00a0\u00a0\u00a0} }<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0435\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2ce\/f49\/118\/2cef4911810ce0a506dd0697ee801119.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0412\u0441\u0435\u0433\u043e 6 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 formatItem \u0438 \u043d\u0438\u0437\u043a\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440<\/font><\/i><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435. \u041d\u043e \u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u0451\u043d\u043d\u043e\u0433\u043e \u0437\u0434\u0435\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435:<\/p>\n<ul>\n<li>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043c\u044b\u0448\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u2014 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f <code>mousemove<\/code> \u0432\u0441\u0451 \u0435\u0449\u0451 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043c\u044b\u0448\u0438, \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f <code>mousemove<\/code> \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0438\u0448\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f (\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435), \u0442\u043e\u0433\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:\n<ol>\n<li>\u041c\u043e\u0436\u043d\u043e, \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>NgZone.runOutsideOfAngular<\/code>. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f <code>mousemove<\/code> (\u044d\u0442\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a).<\/li>\n<li>\u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c zone.js-\u043f\u0430\u0442\u0447 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u043e\u0434\u0430 \u0432 <a href=\"https:\/\/github.com\/angular\/angular-cli\/blob\/888bb27815097e03d82c85aef1a3547ea7769b5c\/packages\/schematics\/angular\/application\/files\/src\/polyfills.ts.template#L46\">polyfills.ts<\/a>. \u042d\u0442\u043e \u043f\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u0432\u0441\u0451 Angular-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; \/\/ \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0430\u0442\u0447 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Angular-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u2014 <a href=\"https:\/\/blog.angularindepth.com\/optimize-angular-bundle-size-in-4-steps-4a3b3737bf45\">\u0432\u043e\u0442<\/a>, <a href=\"https:\/\/blog.angularindepth.com\/improve-performance-with-web-workers-497931fdef1b\">\u0432\u043e\u0442<\/a>, <a href=\"https:\/\/blog.angularindepth.com\/how-to-fix-the-most-common-angular-performance-problems-like-a-doc-770998e05814\">\u0432\u043e\u0442<\/a> \u0438 <a href=\"https:\/\/medium.com\/@krzysztof.grzybek89\/how-runoutsideangular-might-reduce-change-detection-calls-in-your-app-6b4dab6e374d\">\u0432\u043e\u0442<\/a> \u2014 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043e\u0431 \u044d\u0442\u043e\u043c.<\/p>\n<h2><font color=\"#3AC1EF\">\u0418\u0442\u043e\u0433\u0438<\/font><\/h2>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0440\u043e\u0447\u043b\u0438 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e, \u0432 \u0432\u0430\u0448\u0435\u043c \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0435 Angular-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f 5 \u043d\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0435\u0448\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0441\u043e\u0432\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u0448\u043b\u0438, \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  <b>\u0423\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438!<\/b> \u0417\u043d\u0430\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b \u043e \u0447\u0451\u043c-\u0442\u043e \u0442\u0430\u043a\u043e\u043c, \u0447\u0442\u043e, \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 Angular-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f?<\/p>\n<p>  <a href=\"https:\/\/ruvds.com\/turbo_vps\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rw\/6v\/yn\/rw6vyn2bxx4usoqc39holmj2z8m.jpeg\"><\/a><\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \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:\/\/habr.com\/ru\/company\/ruvds\/blog\/459304\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/459304\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Angular \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u0418\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043a\u043e\u0432\u0430\u0440\u043d\u043e\u0435 \u00ab\u043f\u043e\u0447\u0442\u0438\u00bb \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0433\u0443\u0431\u0438\u0442 \u0432\u0440\u0435\u043c\u044f, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043e\u0431\u0445\u043e\u0434\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0438\u043b\u0438 \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u0438\u043b\u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/459304\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bl\/sj\/vq\/blsjvqaqs4fhtnqmscwlw7lx0zs.jpeg\"><\/a><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c, \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u043e\u0432\u0435\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 Angular-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u044f\u0445 Angular, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0435\u043c\u0443 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u043c\u0443) \u0434\u043e\u0432\u0435\u043b\u043e\u0441\u044c \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f.  <\/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-291962","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291962","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=291962"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291962\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=291962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=291962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=291962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}