Tagged Questions
4
votes
1answer
215 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 ...
2
votes
2answers
296 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
2answers
390 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 ...
1
vote
2answers
96 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>
...
1
vote
1answer
76 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 ...
1
vote
1answer
44 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 ...
1
vote
1answer
250 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
1answer
135 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 ...
1
vote
1answer
777 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').
...
1
vote
0answers
46 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 ...
1
vote
0answers
115 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
0answers
353 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 ...
0
votes
2answers
28 views
AngularJS: ng-click listen on a different / specific controller
I have a login form directive with its own controller. The controller basically does the user login when the form is submittted fine. This works absolutely fine.
I am trying to contain my user login ...
0
votes
2answers
173 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
68 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 ...
0
votes
1answer
24 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
64 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
273 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 ...
0
votes
0answers
78 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
62 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
18 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
votes
2answers
38 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 ...