{"id":293928,"date":"2019-08-28T09:00:14","date_gmt":"2019-08-28T09:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293928"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293928","title":{"rendered":"Angular. \u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 @Input, @Output \u0438 EventEmitter"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/medium.com\/@foolishneo\/understanding-input-output-and-eventemitter-in-angular-c1aeb9fff594\">\u00abUnderstanding @Input, @Output and EventEmitter in Angular\u00bb<\/a> \u0430\u0432\u0442\u043e\u0440\u0430 foolishneo.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Angular.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b \u043d\u0443\u0436\u043d\u044b\u043c \u043b\u0443\u0447\u0448\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u0430\u0441\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 Angular \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u043d\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f \u0442\u0435, \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 <a href=\"https:\/\/medium.com\/@foolishneo\/understanding-input-output-and-eventemitter-in-angular-c1aeb9fff594\">Medium<\/a> \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d. <\/p>\n<p>  \u0414\u0430\u0432\u043d\u043e \u0438\u043c\u0435\u044f \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e, \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u043e\u0439, \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435 \u043e\u0431\u044a\u0435\u043c\u043d\u043e\u0439, \u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u0439 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u043d\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439\u043a\u0438. \u041a \u0412\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e, \u0433\u043e\u0441\u043f\u043e\u0434\u0430\u2026 <a name=\"habracut\"><\/a><\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u043e\u0432\u0435\u043d\u044c\u043a\u0438\u0439 \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 Angular, \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b <i>Input<\/i> \u0438 <i>Output<\/i> \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043c\u0443\u0449\u0435\u043d\u0438\u0435, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0412\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0445 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0438\u0445 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. <\/p>\n<h2>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/h2>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <i>Input<\/i> \u0438 <i>Output<\/i> \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043e\u0431\u043c\u0435\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438. \u041e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f\/\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443. <\/p>\n<p>  <i>Input <\/i>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a <i>Output <\/i> \u0434\u043b\u044f \u0438\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438. <i>Output <\/i> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043e\u0431\u044b\u0447\u043d\u043e \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u0430 <i>EventEmitter.<\/i><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0412\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u043e\u0434, \u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u0438\u0438 \u044d\u0442\u043e\u0433\u043e:<\/p>\n<pre><code class=\"plaintext\">@Component({   selector: 'todo-item',   ... }) export class TodoItemComponent {   @Input()  item   @Output() onChange = new EventEmitter() } <\/code><\/pre>\n<p>  \u043e\u043d \u0437\u043d\u0430\u0447\u0438\u0442: <\/p>\n<ul>\n<li>\u042d\u0439, \u044f \u043e\u0436\u0438\u0434\u0430\u044e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u042f \u043f\u043e\u043b\u0443\u0447\u0443 \u0438\u0445 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <i>item.<\/i>  <\/li>\n<li>\u041a\u0441\u0442\u0430\u0442\u0438, \u044f \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <i>onChange.<\/i>  <\/li>\n<\/ul>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0447\u0442\u043e \u0443 \u0412\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <i>TodoList<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <i>TodoItem<\/i>. <br \/>  \u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<i>TodoLis<\/i>t \u0412\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c: <\/p>\n<pre><code class=\"html\">... &lt;todo-item   [item]=&quot;myTask&quot;   (onChange)=&quot;handleChange($event)&quot; &lt;\/todo-item&gt; ...<\/code><\/pre>\n<p>  \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442: <\/p>\n<ul>\n<li> \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <i>TodoList<\/i> \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0435\u0435 \u0435\u043c\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>myTask<\/i> \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 <b><i>TodoItem<\/i><\/b>  <\/li>\n<li> \u0414\u0430\u043d\u043d\u044b\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <i>TodoItem<\/i>, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <i>handleChange()<\/i> \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <i>TodoList<\/i>   <\/li>\n<\/ul>\n<p>  \u0425\u0432\u0430\u0442\u0438\u0442 \u0442\u0435\u043e\u0440\u0438\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440. <\/p>\n<h2>@Input \u0438 <a href=\"https:\/\/habr.com\/ru\/users\/output\/\" class=\"user_link\">Output<\/a> \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438.<\/h2>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <a href=\"http:\/\/stackblitz.com\/edit\/angular-simple-input-output\">\u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u044f \u0441\u043e\u0437\u0434\u0430\u043b 2 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <i>hello<\/i>, \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <i>app<\/i>. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <i>hello<\/i> \u0438\u043c\u0435\u0435\u0442 <i>Input<\/i> \u0438 <i>Output<\/i>:<\/p>\n<pre><code class=\"plaintext\">hello.component.ts @Component({   selector: 'hello',   template: `     &lt;h3 (click)=&quot;onClick.emit('Neo')&quot;&gt;        ...     &lt;\/h3&gt;   ` }) export class HelloComponent  {   @Input() myFriend: string   @Output() onClick = new EventEmitter() } <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <i>hello<\/i> \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u00ab\u0441\u0442\u0440\u043e\u043a\u0430\u00bb \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <i>myFriend<\/i>.<\/p>\n<pre><code class=\"plaintext\">@Input() myFriend: string <\/code><\/pre>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0412\u044b \u043a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 <i>onClick<\/i> \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430 <i>Output<\/i> \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u00ab\u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u043c\u0438\u0440\u0443\u00bb \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c \u00abNeo\u00bb.<\/p>\n<pre><code class=\"plaintext\">&lt;h3 (click)=&quot;onClick.emit('Neo')&quot;&gt; <\/code><\/pre>\n<p>  \u041d\u0438\u0436\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <i>app<\/i>:<\/p>\n<pre><code class=\"plaintext\">app.component.ts export class AppComponent  {   ng = 'Angular'   myName = 'Neo'   upCase(st:string): void { ... } }  app.component.html &lt;hello myFriend=&quot;{{ ng }}&quot; (onClick)=&quot;upCase($event)&quot;&gt;&lt;\/hello&gt; &lt;h3&gt;My name is {{ myName }}&lt;\/h3&gt; <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <i>app<\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u0433 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <i>hello<\/i> \u0432 \u0441\u0432\u043e\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442 2 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<ul>\n<li>\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 <i>&#8216;Angular&#8217;<\/i> \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 <i>hello<\/i> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <i>ng<\/i>  <\/li>\n<li>\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 hello \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 upCase():  <\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"plaintext\">&lt;hello myFriend=&quot;{{ ng }}&quot; (onClick)=&quot;upCase($event)&quot;&gt; <\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 <a href=\"https:\/\/angular-simple-input-output.stackblitz.io\/\">\u0437\u0434\u0435\u0441\u044c.<\/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\/post\/465247\/\"> https:\/\/habr.com\/ru\/post\/465247\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/medium.com\/@foolishneo\/understanding-input-output-and-eventemitter-in-angular-c1aeb9fff594\">\u00abUnderstanding @Input, @Output and EventEmitter in Angular\u00bb<\/a> \u0430\u0432\u0442\u043e\u0440\u0430 foolishneo.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Angular.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b \u043d\u0443\u0436\u043d\u044b\u043c \u043b\u0443\u0447\u0448\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u0430\u0441\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 Angular \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u043d\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043d\u0430\u0439\u0434\u0443\u0442\u0441\u044f \u0442\u0435, \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 <a href=\"https:\/\/medium.com\/@foolishneo\/understanding-input-output-and-eventemitter-in-angular-c1aeb9fff594\">Medium<\/a> \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d. <\/p>\n<p>  \u0414\u0430\u0432\u043d\u043e \u0438\u043c\u0435\u044f \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e, \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u043e\u0439, \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435 \u043e\u0431\u044a\u0435\u043c\u043d\u043e\u0439, \u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u0439 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u043d\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439\u043a\u0438. \u041a \u0412\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e, \u0433\u043e\u0441\u043f\u043e\u0434\u0430\u2026 <\/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-293928","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293928","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=293928"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293928\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}