Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9143781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:06:34+00:00 2026-06-17T10:06:34+00:00

In my page AngularJS’ html templates are bound to the controller’s variables as usual.

  • 0

In my page AngularJS’ html templates are bound to the controller’s variables as usual.
I’m using WebSockets & when I receive a new item I update the scope’s values and call angular’s $apply. This works fine, AngularJS correctly updates the view rendering any new items added/removed…

The tricky part is bringing the Isotope plugin into the mix.
Since the content is dynamic adding items to Isotope ( http://isotope.metafizzy.co/docs/adding-items.html ) isn’t straightforward for a few reasons:

  • On updating the controller’s data and calling apply angular creates the additional elements required.
  • Isotope requires you to know each item you want to add.
  • I don’t think there is a way for AngularJS to tell the controller what html item was created.

Has anyone gotten these 3 pieces of to work together?
Is there a way of getting the HTML created so it can be passed to Isotope?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:06:35+00:00Added an answer on June 17, 2026 at 10:06 am

    I’ll assume you are using ng-repeat to generate the view/HTML.

    Here’s something you can try: create a directive and attach it to the same element where the ng-repeat(s) is/are. Set the directive’s priority such that it runs last (or after other directives). Have the directive’s link function watch the same $scope properties that you updated as a result of the web sockets information (or I suppose you could just create some kind of counter on the scope that you increment each time something changes — watch that counter in the directive). When the directive/watch detects a change, extract the new HTML (via the link function’s element attribute) and send it to isotope.

    You’ll probably need to set some scope properties in the controller that the watch callback can access to determine which items were added/removed.

    link: function(scope, element, attrs, someController) {
        scope.$watch(..., function(newValue) {
           // extract HTML with Angular or jQuery
           var children = element.children();
           for(i=scope.first_new_item; i<= scope.last_new_item; i++) {
               $('#isotope_container').isotope('insert'), children[i]);
           }
           // handle removed items similarly ??
        }
    

    contents() might work better than children(), or use jQuery selectors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm setting up a new app using AngularJS as the frontend. Everything on the
I have a web-page written using AngularJS. When I open it using IE9, the
I'm building a website using AngularJS and Rails. The HTML files that I'm using
Here's the content description for AngularJS page: AngularJS is what HTML would have been,
I've been using directives in AngularJS which build a HTML element with data fetched
Code in html.haml in Rails using AngularJS %table %tbody{:ng-init => my_model=#{@current_user_things.to_json}} %tr{:ng-repeat => row
I am trying to create a page with tabs (using AngularJS). There is a
I am filling in <img src= tags using AngularJS, so urls in my html
I have an AngularJS page with several form inputs. When the some of the
I am now trying to implement a page with Angularjs. But the problem is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.