Таким образом, в моем угловом 2 приложении у меня есть:Компонент Vanilla NG2 не отображается?
//app.component.ts
import { Component } from '@angular/core';
import { sidebarComponent } from './sidebar/sidebar.component';
@Component({
selector: 'my-app',
template: `<sidebar></sidebar>
<h1>helps</h1>`,
providers: [sidebarComponent]
})
export class AppComponent { }
и
//sidebar.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'sidebar',
template: `<h1>sidebar</h1>`
})
export class sidebarComponent { }
Когда я загружаю мое приложение и app.component отображаются, я получаю <sidebar></sidebar><h1>helps</h1>
вынесенные непосредственно (в исходном коде страницы), но не <h1>sidebar</h1>
. Что я пропустил здесь?