Ionic/AngularJS/Instafeed can't access scope

347 Views Asked by At

My question is for Ionic. The following code added to my controller in AngularJS works in pure AngularJS.

In Ionic though, the same code snippet doesn't work. tagName remains undefined. And in this case, I cannot access the scope value. If I change the tagName to something like 'cat' it pulls instagram photos successfully. Any thoughts on how to be able to access the scope?

Error: No tag name specified. Use the 'tagName' option.

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

  feed.run();
1

There are 1 best solutions below

0
On

For anyone coming across this problem, I've created a simple lightweight angular wrapper for Instafeed. You can find it with instructions and a demo which uses $scope variables bound via ngModel at https://github.com/zephinzer/ngInstafeed. Cheers!