何とかコンポーネントがherokuの配備されたバージョンでレンダリングされない場合、ローカルではうまく動作します。エラーはありません。何も表示されません。 (私はいくつかの特別な角度-コンパイラに細かいおかげであるようなので、テンプレートをインポートする角度流星2.0を使用していないこと、それが動作してください:。配備されたバージョンで角2のコンポーネントがレンダリングされない
は、だから私はこのようになりますその上部にいくつかのナビゲーションバー用のテンプレートを得ました。)
import { Component } from "@angular/core";
import template from "./about-navigation.html";
@Component({
selector: "about-navigation",
template,
})
export class AboutNavigation {
}
それはapp.module.tsのdelcarationsである:ここそれでは
...
import { AboutNavigation } from "./templates/about-navigation/about-navigation";
@NgModule({
...
declarations: [ AppComponent,
About,
AboutNavigation,
],
bootstrap: [ AppComponent ]
})
export class AppModule { }
私の実際のコンポーネントである:
@Component({
selector: "about",
template,
})
export class About {
constructor(private router: Router) {
});
}
}
とそのテンプレート:
<about-navigation></about-navigation>
<div class="container about-content page-transition" [@elementState]="pageTransition" >
<router-outlet></router-outlet>
</div>
このセレクタ<about-navigation></about-navigation>
はいえHerokuの上でそれを展開した後、コンテンツなしでレンダリングされます。 それ以外のものはすべて正常に動作します。コンソールに1つのエラーまたは警告がありません。何ができるのかわかりません...
追加する必要がありました。あなたはそれを切ることができますか?また、入力に@を使用できるかどうかわからない –
@LeoCaseiro '[@elementState]'は[トリガ](https://angular.io/docs/ts/latest/api/core/)です。 index/trigger-function.html)私は – cvsguimaraes
を信じています。私はhttps://bergben.github.io/ng2-scrollimate/で働いています。私はそれを知らなかった。ありがとう@snolflake –