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 8261621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:28:20+00:00 2026-06-08T03:28:20+00:00

Currently off the EmberJS wagon for now, and checking out AngularJS. I was trying

  • 0

Currently off the EmberJS wagon for now, and checking out AngularJS. I was trying to create a list of song titles with a “Like” link next to them. When you click on “Like” a count for the number of likes is listed next to the song title. Here’s my jsfiddle and thanks for your help! http://jsfiddle.net/stevenng/SpQH5/7/

  • 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-08T03:28:22+00:00Added an answer on June 8, 2026 at 3:28 am

    Making your $scope.like function do this will work (http://jsfiddle.net/SpQH5/9/):

    $scope.like = function (song) {
        song.like += 1;
    };
    

    Due to Angular’s data-binding {{song.like}} is automatically updated in the DOM when song.like is incremented.


    Note you can also accomplish this without a scope function by incrementing song.like in the ng-click directly like in this fiddle:

      <div class="song" ng-repeat="song in songs">
        <a href="#" ng-click="song.like = song.like + 1">like</a> ({{song.like}}) 
        <h3>{{song.title}}</h3>
      </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently trying to generate the creation SQL for my tables based off
I am currently trying to detect [P Plates] in images made from panoramas off
I'm currently creating a facebook-like news feed, and I'm wondering if I'm better off
I'm currently finishing off my dissertation, and would like to be able to include
Im currently implementing a selectable list based off the jquery selectable grid demo at
I'm currently trying to use a certain SDK that has me loading functions off
Currently my links look like index.php/2011-05-04-06-52-18 How do I turn this off, and use
I am currently trying to write a little program to track time-off requests for
I'm using color plugin (link to google cache, jquery.com currently off) to handle background
I have a class, ExpenseItem and a list based off that class. I'm currently

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.