我试图OAuthComponent
在我的GettingStartedPage
组件中显示一个。提供给我的OAuthComponent
浏览器时没有显示。没有错误。
OAuthComponent.ts
import {Page, NavController} from 'ionic/ionic';
import {Component} from 'angular2/angular2'
@Component({
templateUrl: "app/authentication/components/oauth-component.html",
selector: "oauth-component"
})
export class OAuthComponent {
private nav: NavController;
constructor(nav: NavController) {
this.nav = nav;
}
}
oauth-component.html
<h1>
Testing Something
</h1>
GettingStartedPage.ts
import {Page, NavController} from 'ionic/ionic';
import {OAuthComponent} from "../authentication/components/OAuthComponent";
import "./getting-started.scss";
@Page({
templateUrl: 'app/getting-started/getting-started.html',
directives: [OAuthComponent]
})
export class GettingStartedPage {
private nav: NavController;
constructor(nav: NavController) {
this.nav = nav;
}
}
getting-started.html
<ion-navbar *navbar>
<a menu-toggle>
<icon menu></icon>
</a>
<ion-title>Getting Started</ion-title>
</ion-navbar>
<ion-content>
<main>
<oauth-component></oauth-component>
</main>
</ion-content>