2017-02-16 59 views
0

我調用上mobilefirst 8.0適配器的步驟,由離子2 我能看到設備的響應不工作,但不是在chrome.Got下面的錯誤 的ReferenceError:WLResourceRequest是沒有定義。下面是我的代碼離子2 mobilefirst 8.0適配器調用瀏覽器

import { Component } from '@angular/core'; 
import { NavController } from 'ionic-angular'; 
import { TransitPage } from '../transit/transit'; 
import { TrackDartPage } from '../track-dart/track-dart'; 
import { LocationFinderPage } from '../location-finder/location-finder'; 
import {Http} from '@angular/http'; 
import 'rxjs/add/operator/map'; 
declare var WLResourceRequest; 
calladapter(){ 
    var resourceRequest = new WLResourceRequest("/adapters/trackDart/status/" + 2,WLResourceRequest.GET); 
    resourceRequest.send().then((response) => { 
    alert(JSON.stringify(response.responseText)); 
    }, 
    function(error){ 
     alert(JSON.stringify(error)); 
    }); 
    } 
+0

不在桌面上的瀏覽器上顯示?移動瀏覽器?請提供確切的步驟來重現問題。 –

回答

1

通過我懷疑你正在運行離子服務這是導致你這個錯誤,因爲離子不知道MobileFirst錯誤。相反,運行mfpdev應用預覽運行後npm運行手錶命令。

+0

感謝Prera​​k Tiwari。我嘗試了mfpdev應用預覽並能夠得到結果。 – sadique

相關問題