0
私は、iOSのバージョンが正常に動作します私のAngular2/IONIC2アプリを構築完了していないです。私はAndroidのシミュレータ上でエラーを同じページを実行しようとすると、私はChromeで実行中のアプリを検査する場合しかし、私はそれを得ることができました:レコードの場合Angular2 - EXCEPTION:例外TypeError:未定義関数
EXCEPTION: TypeError: undefined is not a function
browser_adapter.js:77 EXCEPTION: TypeError: undefined is not a function
browser_adapter.js:77 STACKTRACE:
browser_adapter.js:77 TypeError: undefined is not a function
at new DishesComponent (file:///android_asset/www/build/js/app.bundle.js:1746:49)
at AppView._View_MenuPage2.createInternal (MenuPage.template.js:354:31)
at AppView.create (file:///android_asset/www/build/js/app.bundle.js:33434:21)
at TemplateRef_.createEmbeddedView (file:///android_asset/www/build/js/app.bundle.js:33335:14)
at ViewContainerRef_.createEmbeddedView (file:///android_asset/www/build/js/app.bundle.js:33844:35)
at NgFor._bulkInsert (file:///android_asset/www/build/js/app.bundle.js:4250:50)
at NgFor._applyChanges (file:///android_asset/www/build/js/app.bundle.js:4206:14)
at NgFor.ngDoCheck (file:///android_asset/www/build/js/app.bundle.js:4188:22)
at AppView._View_MenuPage0.detectChangesInternal (MenuPage.template.js:225:42)
at AppView.detectChanges (file:///android_asset/www/build/js/app.bundle.js:33581:14)
、問題がONLYに表示されます私はクローム(MAC)上でそれを実行アンドロイドエミュレータは、すべてが正常に動作しています。エミュレートするにはAndroid 5.1
私は実際のデバイスでこれを試していませんが、結果は同じであるはずです。
は、いくつかの掘削後、私は問題を引き起こしてラインを見つけたが、私はそれを解決することはできません!
私が問題を引き起こして行共有しましょう:
page1.html
<ion-slides id="dishes-content" class="dishes-slides" (ionWillChange)="onCategoryChanged($event.activeIndex)">
<ion-slide *ngFor="let category of categories; let i = index">
//When I remove the below line, the issue disappears!!
//This is a directive imported from finalMenu
<dishes [categoryValue]="category" [cart]="cart"></dishes>
</ion-slide>
</ion-slides>
page1.js
@Component({
templateUrl: 'build/pages/page1/page1.html',
directives: [DishesComponent],
queries: {
sliders: new ViewChildren(Slides)
}
})
finalmenu.js
を@Component({
selector: 'dishes',
inputs: ['categoryValue', 'cart'],
templateUrl: 'build/pages/finalmenu/finalmenu.html'
})
... ViewChildren(スライド)は、この段階で定義されていないと思います! –
うーん...多分それはエミュレータ環境やファイルに近い関連://参照...問題がどこにあるか –
まあ、それはAndroidのメーカーが付属していエミュレータだ、私は本当に見ることができません –