Tagged Questions
0
votes
0answers
23 views
angularjs ajax call wrapped by $scope.$apply function preventing ng-click from being executed
I have and custom validation directive which triggers on change to validate user input:
link: function(scope, elem, attrs) {
elem.on('change', function() {$scope.$apply(function(){
...
0
votes
0answers
13 views
AngularJS - ngTouch Error: element.on is not a function
I have just added the mgTouch module into my application. The majority of the project is working as expected, however on page load where i have the following 2 buttons, i see the following error:
...
0
votes
1answer
14 views
ng-click on firing on mobile or tablet devices
On page load i have a controller that calls a service and then binds the returned data to some $scope.objects:
app.controller("MainController", function($scope, $http, serviceGetData) {
...
0
votes
1answer
17 views
Show form using custom directive - AngularJS
I have a button with ng-click function. When I click the button, it should show the form which is coded in a templateUrl using a custom directive.
Which function should I use to get the screen ...
1
vote
1answer
28 views
AngularJS Performing 2 Types Of ng-click based on a Counter
I have a $scope object that contains 50+ records. I have a <div> 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 ...
0
votes
1answer
53 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 ...
1
vote
0answers
34 views
AngularJS - JSON and return all results
I'm trying to write a basic search function using AngularJS. I have written a service that finds my JSON file and binds it to a $scope object $scope.SearchResult
What i am trying to do it perform a ...
0
votes
1answer
56 views
Ng Table Pager template is not allowing any custom data binding like ng-click=“Custom Function”
first
I have used a ng table pager template
I am not able to use my custom function like ng-click='first()' instead of ng-click="params.page(page.number)"
and then call the parameter inside it's ...
1
vote
2answers
88 views
AngularJS Accordion Expand All Collapse All
I am trying to get the accordions to toggle correctly through the directive ng-click. If I have Item one open how do I get it to expand all the accordions? Item two and Item three will continue to ...
0
votes
2answers
38 views
AngularJS - accessing ng-click in custom directive
I'm trying to get my head around directives, i can easily use the template function to throw out my HTML, however, if i have an ng-click within my template, how can i access it within the link ...
0
votes
2answers
44 views
Why are mouse events from my directive not reflected in the view?
Here is an example fiddle. Please open the console first.
It's a little long, so to quickly explain: You'll see two divs. One is "regular", the other is created via a directive. They both have ...
-1
votes
2answers
35 views
How can I bind ng-repeat to the previously clicked ng-click?
I'm having a bit of trouble trying to use an ng-repeat that only references the previously clicked ng-click function.
What I'm trying to create is a demo app with dynamic dummy content.
The concept ...
0
votes
1answer
66 views
ng-repeat ng-click when the click function has already been called earlier in the code
First off, I read the plethora of other questions and answers regarding ng-click, ng-repeat, and child and parent scopes (especially this excellent one.)
I think my problem is new.
I'm trying to ...
2
votes
2answers
128 views
Why does ng-click=“test()” not work but onclick=“angular.element(this).scope().test()” does?
I have defined an angularjs directive as follows:
jtApp.directive("jtWizardPage", [function () {
return {
require: ["^ngController", "^jtWizard"],
restrict: "E",
replace: ...
1
vote
0answers
83 views
Disable ng-click on certain conditions of application for all types of element
In my application I've binded several elements with ng-click directive like below
<a ng-click="DoSomething()"/>
<button ng-click="DoSomethingElse()">xyz</button>
<span ...
1
vote
2answers
80 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>
...
4
votes
1answer
188 views
ngClick does not fire in recursive template
I developed a classic recursive menu and it build itself fine. Problem is that ngClick is never fired from the elements of the recursive directive.
I know it's a problem of scope and I tried many ...
0
votes
0answers
317 views
Unbind ng-click for dynamic dom element in angular
I have a dynamic div which is conditionally pushed into the dom. I have an ng-click event bound to a child element inside the div which fires myfunc() . Now when that div is removed and re-added to ...
1
vote
1answer
693 views
Passing a bound variable to ng-click for dynamic click handler
I have the following dom.
<td grid-item ng-repeat='col in columnDefs' ng-click="actions[col.field]"></td>
This is wrapped in a directive:
angular.module('myApp').
...