{"id":297609,"date":"2020-01-24T09:00:11","date_gmt":"2020-01-24T09:00:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=297609"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=297609","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Angular Elements: \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/485326\/\">\n<p>\u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043b\u0430\u0441\u044c: \u043e\u0442 \u0447\u0438\u0441\u0442\u043e\u0433\u043e HTML\/CSS \u0434\u043e \u0442\u0430\u043a\u0438\u0445 \u0442\u0435\u043c, \u043a\u0430\u043a \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c, \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u0431\u0435\u043a\u0435\u043d\u0434 \u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cv\/3y\/u3\/cv3yu3taqr8twfilr9qnuxyiom4.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442, \u0438 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435.<br \/>  \u041c\u043e\u0434\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d \u00ab\u041c\u0438\u043a\u0440\u043e-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u044b\u00bb \u0441\u0442\u0430\u043b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0440\u0430\u0441\u0442\u0443\u0449\u0435\u0433\u043e \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u043a\u043e\u0434\u0430 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0438 \u0447\u0430\u0441\u0442\u0438. \u0424\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044f\u0442\u0441\u044f \u0438 \u0434\u0435\u043f\u043b\u043e\u044f\u0442\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438, \u0447\u0442\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c, \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0438\u043a\u0440\u043e-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<br \/>  \u0417\u0434\u0435\u0441\u044c \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u0438 \u0431\u0435\u0437 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u0435\u043b\u044e\u0434\u0438\u0439, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u0438\u043a\u0440\u043e-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Angular elements.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3 id=\"sozdanie-mikro-frontendov\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u043e\u0432<\/h3>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0439. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c \u0434\u0432\u0430 Angular-\u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f CLI: <em>travel-booking<\/em> \u0438 <em>flight-booking<\/em>.<br \/>  \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0431\u0438\u043b\u0434\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 Angular. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 flight-booking.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">ng add @angular\/elements ng add ngx-build-plus<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0447\u0435\u0440\u0435\u0437 NPM. <a href=\"https:\/\/angular.io\/guide\/elements\" rel=\"nofollow\">@angular\/elements<\/a> \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Angular \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. <a href=\"https:\/\/github.com\/manfredsteyer\/ngx-build-plus\" rel=\"nofollow\">ngx-build-plus<\/a> \u2013 \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 Angular CLI \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<blockquote><p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u044f <em>document-register-element<\/em> \u0434\u043e 1.8.1 \u0432 <em>\/flight-booking\/package.json<\/em>, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c <a href=\"https:\/\/github.com\/angular\/angular\/issues\/24390\" rel=\"nofollow\">issue<\/a>.<\/p><\/blockquote>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c <em>http-server<\/em> \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <em>flight-booking<\/em>.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">npm i -g http-server --save<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 <em>booking<\/em> \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 <em>flight-booking\/src\/app\/<\/em>. \u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<br \/>  <em>flight-booking\/src\/app\/booking\/booking.component.html<\/em><\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;!--The content below is only a placeholder and can be replaced.--&gt; &lt;div style=&quot;text-align:center&quot;&gt; &lt;a href=&quot;javascript:alert('Welcome to Flight Booking App!!');&quot; style=&quot;font-size:25px;&quot;&gt;{{ title }}&lt;\/a&gt; &lt;\/div&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><em>flight-booking\/src\/app\/booking\/booking.component.ts<\/em><\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { Component, OnInit } from '@angular\/core';  @Component({ selector: 'app-flight-booking', templateUrl: '.\/booking.component.html', styleUrls: ['.\/booking.component.scss'] }) export class BookingComponent implements OnInit {  title = 'Flight Booking App';  constructor() { }  ngOnInit() { }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c booking \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043a\u0430\u043a \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 <em>flight-booking\/src\/app\/app.module.ts<\/em>.<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { BrowserModule } from '@angular\/platform-browser'; import { NgModule, Injector } from '@angular\/core'; import { AppRoutingModule } from '.\/app-routing.module'; import { AppComponent } from '.\/app.component'; import { createCustomElement } from '@angular\/elements'; import { BookingComponent } from '.\/booking\/booking.component'; @NgModule({   declarations: [     AppComponent,     BookingComponent   ],   imports: [     BrowserModule,     AppRoutingModule   ],   providers: [],   bootstrap: [],   entryComponents: [     BookingComponent   ] }) export class AppModule {   constructor(private injector: Injector) {   }  ngDoBootstrap() {     const myCustomElement = createCustomElement(BookingComponent, { injector: this.injector });     customElements.define('app-flight-booking', myCustomElement);   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043e\u0434\u0438\u043d JS-\u0444\u0430\u0439\u043b, \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c angular \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c <em>ngx-build-plus<\/em>. \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 <em>flight-booking\/angular.json<\/em> \u0432 \u0442\u0440\u0435\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"json\">&quot;architect&quot;: {  &quot;build&quot;: {   &quot;builder&quot;: &quot;ngx-build-plus:build&quot;,  .... &quot;serve&quot;: {  &quot;builder&quot;: &quot;ngx-build-plus:dev-server&quot;,    ...  &quot;test&quot;: {    &quot;builder&quot;: &quot;ngx-build-plus:karma&quot;,<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"zapusk-proekta\">\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>  <\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">ng build --prod --output-hashing none --single-bundle true<\/code><\/pre>\n<p>  <\/p>\n<p><em>\u2013output-hashing (none)<\/em> \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u043d \u0444\u0430\u0439\u043b\u043e\u0432.<br \/>  <em>\u2013single-bundle (true)<\/em> \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442 \u0432\u0441\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043e\u0434\u0438\u043d JS-\u0444\u0430\u0439\u043b.<br \/>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">http-server .\/dist\/flight-booking -p 8081<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <em>train-booking<\/em> \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0440\u0442\u043e\u043c 8082.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">http-server .\/dist\/train-booking -p 8082<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"obertka-kastomnogo-elementa\">\u041e\u0431\u0435\u0440\u0442\u043a\u0430 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b <em>flight-booking<\/em> \u0438 <em>train-booking<\/em> \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 <em>\/travel-booking\/index.html<\/em> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;!doctype html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt;   &lt;meta charset=&quot;utf-8&quot;&gt;   &lt;title&gt;TravelBooking&lt;\/title&gt;   &lt;base href=&quot;\/&quot;&gt;  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;   &lt;link rel=&quot;icon&quot; type=&quot;image\/x-icon&quot; href=&quot;favicon.ico&quot;&gt; &lt;\/head&gt; &lt;body&gt;   &lt;app-root&gt;&lt;\/app-root&gt;   &lt;div style=&quot;margin-bottom: 10px;&quot; id=&quot;flight-booking-container&quot;&gt;&lt;app-flight-booking&gt;&lt;\/app-flight-booking&gt;&lt;\/div&gt;  &lt;div id=&quot;train-booking-container&quot;&gt;&lt;app-train-booking&gt;&lt;\/app-train-booking&gt;&lt;\/div&gt;   &lt;script src=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/zone.js\/0.9.1\/zone.min.js&quot;&gt;&lt;\/script&gt;   &lt;script src=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/webcomponentsjs\/2.2.10\/custom-elements-es5-adapter.js&quot;&gt;&lt;\/script&gt;   &lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/localhost:8081\/main.js&quot;&gt;&lt;\/script&gt;   &lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/localhost:8082\/main.js&quot;&gt;&lt;\/script&gt; &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>Angular-\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <strong>zone.js<\/strong>, \u0430 <strong>custom-elements-es5-adapter.js<\/strong> \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 <em>main.js<\/em> \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<br \/>  \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 <em>travel-booking\/angular.json<\/em>, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<pre><code class=\"json\">&quot;serve&quot;: { &quot;builder&quot;: &quot;@angular-devkit\/build-angular:dev-server&quot;, &quot;options&quot;: { &quot;browserTarget&quot;: &quot;travel-booking:build&quot;, &quot;port&quot;: 8080 }<\/code><\/pre>\n<p>  <\/p>\n<p>\u2026<\/p>\n<p>  <\/p>\n<h3 id=\"zapusk-osnovnogo-prilozheniya\">\u0417\u0430\u043f\u0443\u0441\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <em>ng serve<\/em>. \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yk\/sj\/_g\/yksj_gqiawgtsyww3xk9rvfiqeg.png\"><\/p>\n<p>  <\/p>\n<h3 id=\"itogo\">\u0418\u0442\u043e\u0433\u043e<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u0438\u043a\u0440\u043e-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b Angular.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/485326\/\"> https:\/\/habr.com\/ru\/post\/485326\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/485326\/\">\n<p>\u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0435\u0441\u044f\u0442\u044c \u043b\u0435\u0442 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043b\u0430\u0441\u044c: \u043e\u0442 \u0447\u0438\u0441\u0442\u043e\u0433\u043e HTML\/CSS \u0434\u043e \u0442\u0430\u043a\u0438\u0445 \u0442\u0435\u043c, \u043a\u0430\u043a \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c, \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u0431\u0435\u043a\u0435\u043d\u0434 \u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cv\/3y\/u3\/cv3yu3taqr8twfilr9qnuxyiom4.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442, \u0438 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435.<br \/>  \u041c\u043e\u0434\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d \u00ab\u041c\u0438\u043a\u0440\u043e-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u044b\u00bb \u0441\u0442\u0430\u043b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0440\u0430\u0441\u0442\u0443\u0449\u0435\u0433\u043e \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u043a\u043e\u0434\u0430 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0438 \u0447\u0430\u0441\u0442\u0438. \u0424\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u043b\u0438\u0437\u044f\u0442\u0441\u044f \u0438 \u0434\u0435\u043f\u043b\u043e\u044f\u0442\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438, \u0447\u0442\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c, \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0438\u043a\u0440\u043e-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<br \/>  \u0417\u0434\u0435\u0441\u044c \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u0438 \u0431\u0435\u0437 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u0440\u0435\u043b\u044e\u0434\u0438\u0439, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u0438\u043a\u0440\u043e-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Angular elements.<\/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-297609","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297609","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=297609"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297609\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}