Questions tagged [angularjs-ng-click]

1

votes
0

answer
12

Views

After mdBottomSheet hide its remove ng-click fire

i insert in my code mdBottomSheet show and button that open it. this is my mdBottomSheet code: $scope.selectPhoto = function () { var options = { templateUrl: 'student-details/camera-buttons.tpl.html', scope: $scope }; $mdBottomSheet.show(options); } this is my button: after i click the button the m...
kfir
1

votes
1

answer
50

Views

ng-click doesn't work once ng-show div is moved out of overall div

I have a ng-click that shows/hides another section, which is all within the same overall div. I want to move the show/hide section to its own div, but when do this, the ng-click no longer works. My current code that works looks like this: {{$index+1}} {{item.workflow_stage}} errorIncomplete check_...
Dave
1

votes
3

answer
71

Views

ng-click not working in ng-repeat

NG-click not firing in ng -repeat. I want to use ngclick to display only the specific element details. IdNameAgeRole {{ $index + 1 }}{{p.name}}{{p.age}}{{p.mass}} js: var mainApp= angular.module('mainApp', []); mainApp.controller('TableFilterController', function($scope) { $scope.clickMe = function(...
deadpool
1

votes
1

answer
155

Views

Do not trigger ng-click of parent element when clicking wrapped checkbox [duplicate]

This question already has an answer here: AngularJS ng-click stopPropagation 5 answers In AngularJS I have a table row with a ng-click attribute. It is used to bring up a dialog with detailed information about the table item. Furthermore, each table row has a checkbox to select the item for batch p...
user1438038
1

votes
1

answer
51

Views

AngularJS Directive - ng-click not working when using the directive

I'm facing a problem with my new directive. The variables are not being actualized when ng-click. I've found some answers here but all of them call a method. I'm just changing the value of 2 variables when there's a click. Directive: pmcApp.directive('sorting', function() { return { restrict : 'AECM...
Rafael Matos
1

votes
0

answer
65

Views

ng build - Mangle private propertiy names

Why bundles generated with ng build --prod doesn't mangle class private properties? It would be a easy way to reduce the already fat enough Angular bundles. Same thing would be useful with class properties used only in templates. From my point of view, they should be considered private, as they are...
Javier Marín
1

votes
1

answer
1.7k

Views

Passing a bound variable to ng-click for dynamic click handler

I have the following dom. This is wrapped in a directive: angular.module('myApp'). directive('gridItem', function () { return { restrict: 'A', templateUrl: 'views/grid_item.html', link: function postLink(scope, element, attrs) { if (scope.$eval(element.attr('ng-click'))) { element.addClass('clickabl...
Abraham P
1

votes
1

answer
1.1k

Views

AngularJs ng-click not working with fileupload field

I am new to AngularJS, and I got stuck on this ng-click when trying to set some parameters before uploading an image. Here is the code: Click Here var myApp = angular.module('myApp',[]); function TestCtrl($scope) { $scope.id = 1234; $scope.readUploadedImage = function(parentClass, spid) { ale...
Ioana Cucuruzan
1

votes
1

answer
1.9k

Views

ng-click not working in IE but works fine in CHROME

{{country.CountryDescription}} arrayPush() is not being called when I am clicking a specific option $scope.arrayPush = function(){alert('Hello!');}
user2756589
1

votes
1

answer
2.2k

Views

Dynamic function call with angularjs

I have an array of invitationList = ['A','B','C','D'] from this array, I need to form a list having a name of A/B/C/D with button of accept. While clicking this accept button, accept function should be invoked. I tried, var list_Invitation=''; list_Invitation=''; var i = 1; for(var index in invitati...
Hulk1991
1

votes
1

answer
608

Views

Combine ng-repeat and ng-click

I am building an angularJS app using ng-repeat and ng-click on the same element. I have an array of items which I run through to create a list of buttons. Each one of these items has a property category which I'd like to pass as an argument for an ng-click action. So far I have used the following co...
Spearfisher
1

votes
1

answer
4.4k

Views

Angular JS ng-click not responding only on iPad, works fine on Desktop

I am testing a web app on iPad. Everything works fine on desktop and even on desktop touch (Windows 8 machine with touch enabled), but when I get to iPad, the touch event is not firing at all times. It fires intermittently, but not always. Sometimes the ng-click does not work at all. Here is the cod...
nikjohn
1

votes
1

answer
6.5k

Views

AngularJS - Sliding Effect On ng-click

I have created a simple ng-click function that hides and shows a DIV. However, rather and simply appearing and disappearing, does angular have the ability to give a sliding effect? Here's a plunkr: http://plnkr.co/edit/jbHidL3oOQvi4RBCkJIF?p=preview HTML: Lorem ipsum dolor sit amet, consectetur adip...
Oam Psy
1

votes
1

answer
4.1k

Views

AngularJS - Using a custom filter and ngClick to update same ng-repeat

I have a simple ng-repeat. The ng-reapeat can be populated in 2 ways, firstly by typing a value and clicking the Submit button, secondly, entering values and the list automatically updates. The issue i am finding is that when a user clicks on Sumbit, the ng-repeat that uses the filter does not updat...
Oam Psy
1

votes
2

answer
815

Views

Is it possible to chain instructions in an ng-click?

I've got a couple of sliders I want to pick from a menu. As a consequence, I need to both pick the right slider and reset the first slide to 0. I have a slide model I set to 0 fro the ng-click just before opening the popup, but, unfortunately, slide is not reset to 0. Any idea? PS: I don't want to m...
1

votes
1

answer
685

Views

AngularJS Performing 2 Types Of ng-click based on a Counter

I have a $scope object that contains 50+ records. I have a that displays the first 5 records in this $scope via a limitTo. I have a button 'See More' that on each click displays the next 5 records. However, once 50 records have been shown, i would like my button to call a function getMore() which,...
Oam Psy
1

votes
1

answer
1.1k

Views

AngularJS ng-click does not work in ng-grid

I am creating an ASP.net MVC application and in that I am displaying ng-grid with a column which has link as cell content. Here's how I achieved it. Controller (ng-grid): columnDefs: [ { field: 'FreightRules', visible: true, cellTemplate: ' ', enableCellEdit: false, enableCellSelection: false }]...
RandomUser
1

votes
1

answer
813

Views

Adding and removing a class from parent div AngularJS

I have 3 boxes each with it's own button. The button is used to collapse it's parent div by adding a class of 'collapsed' to the parent. I have go the classes being added but I need to get them working independently of the other boxes, so that box1 will not be effected if it is closed and I click on...
Daimz
1

votes
1

answer
953

Views

ng-click ng-keypress passing form data not working

Im trying to send data from user input to display on the screen when button click. The problem is that if i click on the button it simply passes to the next value without gathering the information and displaying in the screen. If i press ENTER it works how it should. i have searched all over interne...
Wizzard
1

votes
3

answer
1.7k

Views

Angular - ng-click on a div works only when you click on specific areas of a div

I am trying to create a div that has a bunch of disabled fields. They get enabled on clicking anywhere in the div. I find that clicking anywhere in the div causes ng-click to be fired, while clicking on a dropdown that is disabled does not seem to fire ng-click. Here's an example. http://jsfiddle....
Vinay Venu
1

votes
1

answer
742

Views

Reload Model On ng-click

This is my HTML Code: Angular App Name Price {{item.name}} {{item.price | currency}} Change This is my controller: app.controller('defaultController', function($scope) { $scope.dataSource= 'controller'; $scope.products = [{ name: 'Apples', price: 1.20 }, { name: 'Bananas', price: 2.42 }, { name: '...
Mohan Seth
1

votes
1

answer
844

Views

how to call form function in ng-click with href text?

is it possible to call same function search() with href text value as search variable $scope.keywords ? function customersController($scope, $http) { $scope.search = function() { $scope.url = 'http://www.vanmaram.com/json_result.php?en=' + $scope.keywords; // The url of our search $http.get($scop...
Mo.
1

votes
4

answer
2.6k

Views

AngularJS closing a div which shows up on ng-click

I created a button Which shows a on click and toggles back when clicking again! $scope.chooseOptions=function(){ $scope.appearOnChoice=!$scope.appearOnChoice; } However, I also want this element to hide again, when the user clicks anywhere outside this div element. How can I do this? I need strictly...
Dribel
1

votes
2

answer
342

Views

Using $compile in services asking for scope

Can i use $compile in the services as it is throwing error scope doesn't exist. services.factory('getRegistersrvs', function($http, $compile) { return { getRegisterpage: function() { return $http.get(baseUrl+'signup', {cache: true}); }, replaceTemp: function(response, $elem) { $elem.replaceWith($com...
Leela Narasimha
1

votes
1

answer
3k

Views

ng-click not working for dynamically inserted html got from the http.get call in angular js

Hi I am using angular js for my php project. I am using ngclick for anchor link which is like this Don't have an account? Create One when clicks on the link i will call method showregister in controller and replace the html by calling http get method. $http.get(baseUrl+'signup').success(function...
Leela Narasimha
1

votes
1

answer
99

Views

Angularjs setting filter variable dynamically via infoWindow

I have a select box that interact with the angular list and it works fine. The select box handle the 'citta' field and when I change the value of it, the list is filtered. ng-model='queryLoc.citta' Before everything, I istantiate the variable $scope.queryLoc = { citta: ''}; Now I want to set the que...
m.cainelli
1

votes
1

answer
5.9k

Views

angular: calling a function with parameter using ng-click inside directive template

new to angular here :) I have a custom directive that have an ng-click in it which calls a function I have defined in a controller (not the directive controller). This is the html view: This is the directive: scotchApp.directive('coursePass', function($compile) { return { restrict: 'E', controlle...
Aviv
1

votes
1

answer
390

Views

AngularJS, Foundation - navigation downtown ng-click not working

For some reason my ng-click directive is not being called on dropdown menus using AngularJS, Foundation and the Angular Foundation library. Clicking on links does not work, but I am currently more concerned with ng-click working. In the code below, clicking the link TOP-LEVEL works on the navigatio...
el n00b
1

votes
1

answer
663

Views

ng-click / ng-class combination not working as expected with $index

For some reason my ng-click / ng-class combination is not working. On click the class 'hide' has to be added based on the equality of the productDisplay variable. {{product.name}} {{$index}} I can click on the element and the div fileList will open but i can't close them once they are opened. Any i...
kevinius
1

votes
1

answer
994

Views

ng-click event listener fired when sibling element is clicked [duplicate]

This question already has an answer here: angularjs ng-click event of two sibling tag fired, instead of one 2 answers The ng-click directive's event on a button element is being registered even by it's sibling input element. Clicking inside the anywhere inside the input element also fires the click...
Aby Rajan
1

votes
1

answer
1.2k

Views

AngularJS - ui-bootstrap accordion - using ng-controller inside ng-repeat doesn't work

I'm trying to construct an accordion list that shows more details when the accordion expands. Here is a simplified version of the template: {{r.name}} {{v.detail}} The DetailsController initially has an empty details array, but when the function getDetails() is called, that array is populated by a s...
ambient
1

votes
2

answer
2.5k

Views

Angular-Foundation and ng-click not working on <a> tag

Spent the whole day trying to figure this simple issue but no luck. I added ng-click to < a > tag but it's not calling the function. If I put the ng-click on a button, it works. I've tried the following with no success. Sign Out Sign Out Sign Out Sign Out Sign Out I noticed though that when I click...
devwannabe
1

votes
1

answer
64

Views

How to close out all popovers on body click in Angular?

http://plnkr.co/edit/hqXGl47EJ0wVaEgoXk3X?p=preview I'm trying to find the best way to accomplish this. Basically there are several popovers we have in our app, for fuzzy search, additional options, help tips etc etc. When any of them are open, they need to be closeable if the user clicks anywhere e...
Leon Gaban
1

votes
1

answer
611

Views

How to prevent a ng-click event on a div in a sub controller from triggering an ng-click in the root?

http://plnkr.co/edit/gB7MtVOOHH0FBJYa6P8t?p=preview I have a parent child controller example above, in the child when a button is clicked I displays the div showPop and then will $emit an event upwards to the $rootScope. Now in the parent / $rootScope I 'hear' that event then activate another functi...
Leon Gaban
1

votes
1

answer
646

Views

Angular in chrome auto-firing ng-click

I think I'm losing my mind I'm working on a medium-large angular app. I came in and rebooted this morning and now angular seems to be executing every ng-click function when the state loads (I'm using $stateProvider). Was definitely not happening yesterday. Doesn't happen in canary, or ie, or FF.....
Charlie Wynn
1

votes
2

answer
125

Views

Creating a SPA using Angular JS and ng-show?

I've recently completed CodeSchool's tutorial on Angular JS. I want to create a simple SPA which changes a certain block of content inside a constant frame upon an anchor click. I was thinking that I could cuse ng-click on the anchor tags, change a variable inside a controller, and based on the va...
Allenph
1

votes
1

answer
209

Views

Angular Js ng-click not firing?`

Hey all I'm having the weirdest issue getting ng-click to fire in my angular app. Here's what I'm dealing with: and here is the base controller: (function(){ 'use strict'; Caribou2015.controller('BaseController', ['$rootScope', '$scope', 'Dates', function($rootScope, $scope, Dates){ console.log('ba...
Kobby
1

votes
3

answer
9.8k

Views

Changing color of a div on ng-click and resetting rest all to their normal colors

I am trying to change the color of a div on click of ng-click. I have done half of the work. I am able to toggle the color of the div when clicked, but I need all other divs to revert to their original color. There should be no more than one div that is not its original color. HTML code- Hello, {{...
RHUL
1

votes
1

answer
81

Views

How to render content inside the block with ng-click?

I've setup dropdown button on frontend and now I have to display my array inside separate content block only when dropdown item is selected. How do I do this? Here's my plunker HTML Options Display tasks Js var myApp = angular.module('myApp', ['ui.bootstrap']); myApp.controller('DropdownCtrl', func...
Alexander Shmatko
1

votes
1

answer
522

Views

Conditional ng-click

Is it possible to conditionally include an ng-click into the dom? Both my desktop view and mobile view share the same template, but I only need the ng-click in the desktop view. For example, in my desktop view I want something like this: Content ... and in my mobile view I want something like this:...
developthewebz

View additional questions