簡體   English   中英

Ionic / AngularJS / Instafeed無法訪問范圍

[英]Ionic/AngularJS/Instafeed can't access scope

我的問題是離子的。 以下在AngularJS中添加到我的控制器中的代碼可在純AngularJS中使用。

但是在Ionic中,相同的代碼段不起作用。 tagName保持未定義。 在這種情況下,我無法訪問范圍值。 如果我將tagName更改為“ cat”之類的內容,則會成功提取instagram照片。 關於如何訪問示波器有任何想法嗎?

錯誤:未指定標簽名稱。 使用“ tagName”選項。

  var feed = new Instafeed({
    get: 'tagged',
    tagName: $scope.artists.instagram,
    clientId: 'xxxxxxxxxxxxxxxxx',
    resolution : 'standard_resolution'
  });

  feed.run();

對於遇到此問題的任何人,我都為Instafeed創建了一個簡單的輕型角形包裝器。 您可以在https://github.com/zephinzer/ngInstafeed上找到帶有說明和使用通過ngModel綁定的$ scope變量的演示的示例。 干杯!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM