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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:42:18+00:00 2026-06-14T15:42:18+00:00

When the ng-repeat area in my code example is executed the ng-click actions are

  • 0

When the ng-repeat area in my code example is executed the ng-click actions are not working. Although if moved outside the ng-repeat it would work. Which am not sure how to solve or what is causing this to happen,

my HTML

<table class="table table-bordered table-hover" id="my-vehicles-table" ng-controller="VehicleController">
                <tbody>
                    <tr ng-repeat="car in cars">
                        <td><a href="{% ng car.get_absolute_url %}">{% ng car._get_model_display.make_display %} {% ng car._get_model_display.model_display %} {% ng car._get_model_display.trim_display %}</a></td>
                        <td>{% ng car.created_since %}</td>
                        <td>{% ng car.view_count %}</td>
                        <td>
                            <a href="#" ng-click="delete($event, {% ng car.id %})" class="btn btn-danger btn-mini delete-btn">{% trans 'Delete' %}</a>
                            <a href="#" ng-model="edit" class="btn btn-primary btn-mini edit-btn">{% trans 'Edit' %}</a>
                        </td>
                    </tr>
                </tbody>
</table>

where by {% ng xxx %} will output {{ xx }} this is the django template tag for it. The content is rendered normally, even inside the anchor for delete, I can see delete($event, num) so its populating the values correctly.

But when I click the delete anchor its not invoking the function delete from my following controller

'use strict';

function VehicleController($scope, car) {
    car.query(
        // params
        {created_by: '1'},
        // success
        function(data) {
            $scope.cars = data.objects;
        },
        // error
        function(data) {

        }
    );

    var init = function() {

    };



    $scope.delete = function($event) {
        console.log('dude');
//        car.delete({id: id});
    }


    // initialize values
    init();


}
  • 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-14T15:42:20+00:00Added an answer on June 14, 2026 at 3:42 pm

    delete($event, {% ng car.id %}) should probably just be delete($event, car.id)

    I’m presuming {% ng %} is custom {{ }}? I’ve not seen that before. Either way, you don’t need the {{ or {% ng inside of the ng-click="", as that’s $eval‘ed.

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

Sidebar

Related Questions

In order to not repeat myself, I would like to create a function that
I have created a repeat control that list some documents. I would like to
I have a simple 'repeat with' in an AppleScript, and would like to move
To be more clear When you run the code ---- click 'show' in the
I have a site layout I'm working on that has a main content area
Disclaimer: I'm not a real developer, so I've probably got some code spaghetti here...
I have a menu and jquery-code, which makes its background-image different when hover. $('#menu
I want to repeat a function from the moment the program opens until it
I want to repeat the rows of a data.frame, each N times. The result
Quick question on Bitmap repeat x and y, i tried the following and it

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.