2016-09-16 14 views
0

angular2とtypescriptを持つnativescriptアプリを開発中です。アプリをビルドしている間は完全にビルドされていますが、httpコールは実行に失敗します。 @ angular: "2.0.0"、nativescript-angular: "0.6.0"を使用しています。以下に私のエラーログが含まれています。誰でも私を助けてください。事前のおかげでnativescriptはgetCookieのプロパティを読み取ることができませんnull

com.tns.NativeScriptException: 
Calling js method onClick failed 

Error: Error in login/login.html:7:77 caused by: Cannot read property 
'getCookie' of null 
File:  
"/data/data/org.nativescript.groceries/files/app/tns_modules/@angular/core/bundles/core.umd.js, line: 9688, column: 20 


StackTrace: 
Frame: function:'DebugAppView._rethrowWithContext',file:'/data/data/org.nativescript.groceries/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 9688, column: 21 
Frame: function:'', file:'/data/data/org.nativescript.groceries/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 9701, column: 27 
Frame: function:'', file:'/data/data/org.nativescript.groceries/files/app/tns_modules/nativescript-angular/renderer.js', line: 221, column: 26 
Frame: function:'ZoneDelegate.invoke', file:'/data/data/org.nativescript.groceries/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js', line: 190, column: 28 
Frame: function:'NgZoneImpl.inner.inner.fork.onInvoke', file:'/data/data/o 

package.json

"dependencies": { 
"@angular/core": "2.0.0", 
"@angular/common": "2.0.0", 
"@angular/compiler": "2.0.0", 
"@angular/http": "2.0.0", 
"@angular/platform-browser": "2.0.0", 
"@angular/platform-browser-dynamic": "2.0.0", 
"@angular/platform-server": "2.0.0", 
"@angular/forms": "2.0.0", 
"@angular/router": "3.0.0", 
"email-validator": "1.0.4", 
"everlive-sdk": "1.7.1", 
"nativescript-angular": "0.6.0", 
"nativescript-iqkeyboardmanager": "1.0.1", 
"nativescript-social-share": "1.3.0", 
"nativescript-unit-test-runner": "^0.3.3", 
"rxjs": "5.0.0-beta.12", 
"reflect-metadata": "^0.1.8", 
"tns-core-modules": "2.2.1" 
}, 

"devDependencies": { 
"zone.js": "^0.6.21", 
"babel-traverse": "6.8.0", 
"babel-types": "6.8.1", 
"babylon": "6.8.0", 
"codelyzer": "0.0.28", 
"filewalker": "0.1.2", 
"jasmine-core": "^2.4.1", 
"karma": "^1.2.0", 
"karma-jasmine": "^1.0.2", 
"karma-nativescript-launcher": "^0.4.0", 
"lazy": "1.0.11", 
"nativescript-dev-typescript": "^0.3.2", 
"tslint": "^3.14.0", 
"typescript": "^1.8.10" 
} 

login.htmlと

<StackLayout> 
<Image src="res://logo_login" stretch="none" 
horizontalAlignment="center"></Image> 

<TextField hint="Email Address" keyboardType="email" 
[(ngModel)]="user.email" 
autocorrect="false" autocapitalizationType="none"></TextField> 
<TextField hint="Password" secure="true" [(ngModel)]="user.password"> 
</TextField> 

+1

に "HTTP_PROVIDERS" すべてを変更してください。 –

答えて

関連する問題