Angular ng-click Directive in Controller

Angular ng-click Directive in Controller

Today, We want to share with you Angular ng-click Directive in Controller.
In this post we will show you AngularJs ng-click Event Example, hear for AngularJS Events: ng-click, ng-show, ng-hide we will give you demo and example for implement.
In this post, we will learn about Angular ng-click Directive demo with an example.

READ :  Vue Js Get Current Date Time Example


The ng-click events directive says to AngularJS what to do when an HTML tags element is howmany times clicked.

AngularJs ng-click Event Example


Simple Click This Submit button:

The button has been clicked to {{count_no}} times.

Solution of AngularJs All Problems For

My First Web-Application in angularjs, So I am very happy and 1000+ more then people are used of


ng-click call function with parameter



var app = angular.module(‘app’, []);

function newCtrl($scope) {
$scope.tasks = [{id:1,’name’:’Angularjs-ng-click’}, {id:2,’name’:’angular ng-click directive’}, {id:3,’name’:’’}];

$scope.removeTaskdelete = function(id){
alert(“New Post Id is “+id);

angularjs ng-click href


Sign out

$scope.go = function ( path ) {
$location.path( path );


angularjs ng-click call directive


var app = angular.module(‘infinityknowApp’, []); //module define

app.directive(‘myDirective’, function(){
return {
restrict: ‘EA’,
replace: true,
scope: {
eventHandler: ‘&ngClick’
template: ‘


app.controller(‘SimpleCtrl’, [‘$scope’, function($scope) {
$scope.myFirstFunction = function(msg) {
alert(msg + ‘!!! Your first function is call!’);
$scope.mySecondFunction = function(msg) {
alert(msg + ‘!!! your second function is call!’);

ng-click pass object


function collapseQuestion($event) {
$event.currentTarget //For basic Example of do something with currentTarget

Angularjs ng-click Example

We hope you get an idea about Angular ng-click Directive in Controller
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

We hope This Post can help you…….Good Luck!.

Leave a Comment