Skip to content
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
This repository was archived by the owner on Aug 28, 2026. It is now read-only.

pf-src not populating data-src #2

Description

@sk5

Hello, I have encountered an issue that I haven't been able to pin down after a day of trying to troubleshoot it on my own. I have a few places in my angular app where I am trying to implement your picturefill add on. I have two partials where I am trying to get everything working. The first partial is populated at the root of the site and I am referencing the images from JSON successfully. The second instance is also a partial but a new JSON item is being called to populate it based on the templateURL. The image URL's populate just fine within the picture-fill pf-src but they do not populate the data-src, which in turn results in the img's being blank as well. Everything else works perfectly as intended, the data-src is just isn't populating.

Here are a few bits of code to give you a better picture of the structure

$routeProvider.
      when('/', {
          templateUrl: 'Partials/home-posts.html',
          controller: 'PostListCtrl'
      }).
      when('/post/:postUrl', {
        templateUrl: 'Partials/post.html',
        controller: 'PostDetailsCtrl'
      });

This is the controller for the working picture-fill

postController.controller('PostListCtrl', function($scope, Post) {
    $scope.posts = Post.query();
});

This is the controller for the failing picture-fill

postController.controller('PostDetailsCtrl', function($scope, $routeParams, Post) {
    $scope.post = Post.get({postUrl: $routeParams.postUrl});
});

Any help would be appreciated! Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions