Tagged Questions
0
votes
3answers
26 views
ng-click not firing when using ng-mouseenter or ng-mouseover on tablet
In my project I'm using AngularJS v1.2.16 and Bootstrap v3.1.0.
The following code is correctly working on desktop side but not when trying it via tablet (ipad)
In case of tablet, the ng-click is not ...
0
votes
2answers
40 views
Toggle between input and textarea, but only if the text is long
My goal here is to show a textarea every time when the user click in the input and its content length is greater than 20, if not I keep showing the normal input.
I don't know what is missing in my ...
1
vote
1answer
38 views
Angulajs ng-click doesn't update view
myApp.controller( 'ModalNewInstanceCtrl', [ '$scope', '$modalInstance', function( $scope, $modalInstance ) {
$scope.tabSelected = 0;
$scope.saveFactor = function () {
console.log('here');
...
0
votes
1answer
26 views
How do I use predefined directives (ng-click) with custom directives in a nested fashion?
How do I ng-click to work for the button in ngSearchBar.html? I want to use the same scope as my parent directive (ngSearchBar.html) for my child directive (ng-click), so that I can do scope.search = ...
0
votes
1answer
10 views
How to pass interpolated value as an argument into a javascript function in angularjs
I call a function when a button is clicked in html in my angularjs app like below
<button type="button" class="btn" ng-click="foo(bar, fruits, {{user.email}})">Get it Done</button>
foo ...
0
votes
1answer
28 views
Unable to create toggle effect - Angularjs
I'm following along in the tutorials with an AngularJS and am unable to create a toggle effect.
My console reads this error: TypeError: Cannot set property 'show' of undefined
at new ...
0
votes
1answer
20 views
not able to call ng-click in angularjs? [closed]
I am a newbie and learning AngularJS, and I am stuck at a point and not able to figure out what is wrong I am doing. So I have a spring RESTful service and it is working fine but I am not able to call ...
0
votes
1answer
38 views
Append HTML in angular js giving errors
I am a newbie in angularjs and was trying to append the data in the view on click event.
The following is the code I have written:
Html
<div id="space-for-buttons">
<input ...
0
votes
2answers
52 views
Angular ng-click load controller
I'm trying to practice angular and I'm stuck this this.
How do I make ng-click load the displayController? Or am I doing this wrong way?
The Angular
var bible = angular.module('bible', []);
// ...
0
votes
0answers
64 views
angularjs:-How to add/Trigger more data on click events
Hi I am a newbie in angularjs and wanted to implement how to display or to make a call depending on a click event.
I have the following Html in which I want to display/make a call to the api to get ...
0
votes
2answers
88 views
AngularJS : ng-click not working
I am new in AngularJs, ng-click is not working as expected. I searched on the internet , Follow the tutorial , (that was working) - but this is not working!!!
My Code:
<div class="row" ...
0
votes
0answers
36 views
Click on elements inside a button do not trigger ng-click function in Tizen using AngularJS
I have the following code:
<div class="keypad_row" ng-repeat="row in ctrl.keys">
<button id="key_{{key}}" ng-repeat="key in row" ng-click="ctrl.onKeyPressed(key)">
<img ...
1
vote
3answers
63 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 ...
-1
votes
1answer
366 views
AngularJS ng-show one condition with multiple elements
I have three divs with an ng-click with a "showMe" boolean. Their paragraphs have an ng-show that evaulates "showMe".
My question is, how can I use one condition to show the paragraph on the div I ...
1
vote
2answers
48 views
How to dynamically update view in AngularJS
I have 2 div elements as following and I want to show only one of them based on the doStuff() function being called in the controller when an anchor element is clicked.
<div ...
0
votes
3answers
72 views
Remove click event on last item in ng-repeat
I have an ng-repeat which looks like the following:
<ol>
<li class="pointer node-name" ng-click="myClick(node)" ng-repeat="node in myArray">{{node.name}}</li>
</ol>
This ...
0
votes
1answer
60 views
Data Binding not passing correctly to controller function parameter inside ng-repeat
I am building a menu to allow users to change CSS on my webapp. My js method takes a string and then adds it into a URI for a bootswatch CDN. The code works when I hardcode a string. When I use the ...
0
votes
1answer
26 views
How to toggle class name with ng-click
I want that each click on .clickClass would affect toggle .foo on .present class -
mean -
init - present ,
1st click present foo
2nd click present
and so on ...
so far I have -
<div ...
0
votes
1answer
61 views
How to prevent CSS3 transform from make elements unclickable
Please look at my live code ::
CODE PEN
CSS3 translate: rotate() makes elements unclickable unless rotations == 0
I'm using the accelorameter to move elements over an axis. Unfortunatly these ...
0
votes
1answer
37 views
Dynamic elements in ng-repeat; ng-click
EDIT: RESOLVED
My apologies, my mistake was due to something completely unrelated (logic in the ng-click event). But cheers!
ORIGINAL:
I hope all is well.
I have a block of HTML that is doing ...
3
votes
2answers
110 views
x = x+1 != x++?
I have a really simple angular app. It just adds 1 to the value on ng-click.
See JSFiddle
<div ng-app="app" ng-controller="ctrl">
<div ng-click="hello=hello+1">THIS WORKS ON CLICK: ...
0
votes
2answers
332 views
Angular JS Ng-Show / Ng-Hide
I am writing an angular service for a login form. I have written a factory (and used an http injector) that takes care of submitting the digest HTTP credentials to the rest service. My Authentication ...
0
votes
1answer
107 views
ng-click child checkbox of Parent div
How do you make a parent div click propagate to its child checkbox in AngularJS? The Checkbox will have the hidden attribute, so we need to allow the parent div be the clickable entity.
HTML:
...
1
vote
1answer
263 views
AngularJS ng-click not being fired from dynamic buttons in JQuery code
in jquery code I am trying to add a function in scope and then call that function from a dyncamically created button but ng-click is not being called:
$(document).on("click", ".inlinelbl", function ...
1
vote
2answers
62 views
ng-click loose the function context
I am using angularjs.
I have a directive that gets a function as parameter:
module.directive('someDirective', [function () {
return {
restrict: 'E',
template: <button ...
-2
votes
1answer
295 views
NG-Click not working in Chrome but works in FireFox
I have a NG-Click to change the amount of elements on the page (that are coming from an API call). The NG-Click utilizes a drop down box that works in FireFox. But I recently discovered that it ...
1
vote
3answers
323 views
ng-click event gets bind to child li in angular js
Hey I am binding menuIconClick($event) function on li using ng-click directive.But gets bind to child li also.
Code like as follow
%div.sideNavBar
%ul.navBar
...
0
votes
0answers
80 views
Grid-a-licious disconnects AngularJS ng-click events
I'm using Grid-a-licious (http://suprb.com/apps/gridalicious/) for a layout tool. It works by removing elements from the DOM and adding them back as cards in columns. Inside the cards, I have ...
2
votes
2answers
46 views
How to make work ng-click and $timeout
Well, I have some function that invokes via ng-click.
For example, this function set variable a to true, and after few seconds variable should become false.
Function looks like this one:
$scope.do ...
0
votes
1answer
29 views
Ng-model does not update HTML
On ng-click I change model but html is same...
html
<p>Rezervisanih:<span>{{seatsInfo}}</span></p>
<div ng-click="change()">change</div>
js
$scope.seatsInfo = ...
0
votes
0answers
62 views
Link under an ngClickable table row in AngularJS application
I have a table defined in a template like this:
<table ng-table="tableParams" show-filter="true" class="table ng-table">
<thead>
//...
</thead>
<tbody>
...
2
votes
1answer
66 views
ng-click won't work with dynamic includes
This fiddle demonstrates some code where I lazily add a partial with it's own controller.
Everything works fine, but for some reason my ng-click event just won't fire. Any idea what I'm doing wrong?
0
votes
2answers
125 views
trigger ng-click by element id?
Ok i have a ng-repeat iterating over a array passing the $index to a ng-click inside the ng repeat like so:
<div class="animate-repeat row" ng-repeat="items in sortedTypes">
<div ...
0
votes
3answers
665 views
AngularJS ng-repeat ng-click
I am trying to have a grid of images, when clicked the image is hid from the grid and shown featured at the top.
HTML:
<div ng-controller="imageCtrl">
<div class="row">
...
3
votes
2answers
226 views
Couldn't able to pass the anchor tag id value through ng-click in Angular JS. Getting undefined value
I'm a newbie in AngularJS please help me out to find the issue , code shown below ( html code part - 1 with js code part-2) is working perfectly in my browser and I'm getting the alert.
Html Code
...
0
votes
1answer
170 views
AngularJS - Issue appending HTML to single item in ng-repeat
THE SITUATION:
I am exploring AngularJS by re-building a former project with it. I am using the angularjs-rails gem version 1.2.16. I have a page were I make an API call that returns an array of ...
1
vote
2answers
58 views
write custom function for navigation angularjs
So I have a navigation that I want to have a dropdrown menu with sub-menu functionality on it. I tried ng-show for showing and hiding the menus but then I would have to go back and click on item again ...
1
vote
2answers
554 views
AngularJS - using data binding {{}} in ng-click
Is there a way to change the method called by ng-click dynamically?
Something like this:
ng-click = "{{functionCalled}}"
and then declaring the function by:
$scope.functionCalled = ...
0
votes
1answer
51 views
angularjs: why ng-click doesn't seem to evaluate {{}}
In a ng-repeat tag, I have a ng-click which contains a code to be evaluated as follows:
<div ng-repeat="stage in stages" class="selectable stage stage{{stage.stage}}" ...
0
votes
0answers
126 views
Fire directive, refresh, & pass parameter on ng-click
tldr;
I need to fire a custom directive/jQuery plugin on ng-click and pass a parameter to it then reload that page so the parameter's value takes place. So on reload instead of there being 3 results ...
0
votes
1answer
172 views
Angular: ng-click only on subset of elements inside a ng-repeat
I'm using Angular; I have have an ng-repeat loop where I'd like to make some elements clickable.
Something like the following:
<div ng-repeat="item in itemList">
<span ng-class="{ ...
0
votes
0answers
74 views
ng-click doesn't work when html is load from php
Why when i load this button from the php the ng-click doesn't work ?, I'am using angular and I'm loading all this from the angular controller, and when i put the button directly in the view of the ...
0
votes
0answers
53 views
AngularJS - how change a class of a specific element from the same function
html:
<div id="myid" ng-class="{angularClass:_class}" ng-click="toggleColor();">hello</div>
<div id="myid2" ng-class="{angularClass:_class}" ...
2
votes
1answer
2k views
AngularJS - Open link in new tab when conditionally routing via controller
In my app, I have two types of profile for organisations. When a user click on a profile name, I first need to check whether I have a premium profile for that organisation, and if so, route the user ...
1
vote
1answer
773 views
Triggering function on ngclick with AngularJS
I have a function that makes a $http call to an external API and then populates some results within an ng-repeat array.
Right now the function gets triggered on every element on the ng-repeat, which ...
2
votes
1answer
850 views
Angular: prioritize ngclick over nghref in <a> elements
tl;dr: How can I force angular to only execute the ngclick directive in an <a> element without emptying/removing the href?
My site has some custom behavior on some elements (modal opens, ...
0
votes
2answers
2k views
passing parameters to ng-click's function in angularjs
How to pass, so to say, refference to scope's parameter, in ng-click
You can check what I want in this pluner
http://plnkr.co/edit/Em7LiNStICjZA23pSph3?p=preview
1
vote
2answers
100 views
AngularJS 1st ng-class works 2nd doesn't
I have the following:
<div data-ng-controller="resultsController">
<div id="DIV1" ng-include src="'views/sidebar.html'" ng-class="showSidebar ? 'open' : 'closed' "></div>
...
0
votes
1answer
52 views
Make ng-click work on WebDB rendered <a>
I have a that renders data from my localstorage. These lines have a Edit function. These brings them to another page. The ng-click function on this link isn't fireing when it is clicked.
The HTML:
...
1
vote
1answer
937 views
How to use angularjs ng-click with html5 datalist
I'm working with AngularJS and i want to use the directive ng-click when an element of a datalist (html5) is selected.
Here is an example of my actual code:
<label>Search</label>
...