Hi,

I am unable to supply the highlighted parameter to the hg-click attribute. 
Am I doing something incorrect? Please help.

Script:

(function(angular) {
  'use strict';
angular.module('expressionExample', [])
  .controller('ExampleController', ['$window', '$scope', function($window, 
$scope) {
    $scope.name = 'World';
    $scope.one={};
    $scope.one.greet = function() {
      $window.alert('Hello ' + $scope.name + "..." + arguments[0].a);
    };
  }]);
})(window.angular);

HTML code

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Example - example-example25-production</title>
  <script 
src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js"></script>
  <script src="script.js"></script>
</head>
<body ng-app="expressionExample">
  <div class="example2" ng-controller="ExampleController">
  Name: <input ng-model="name" type="text"/>
  <button *ng-click*="one.greet({'a':'s','d':'f'},*function(data){return 
false;}*)">Greet</button>
  <button ng-click="window.alert('Should not see me')">Won't greet</button>
</div>
</body>
</html>


Same code is placed in http://plnkr.co/edit/FPWScyUrAljsLw1Rlbj4?p=preview


I am seeing below issue in console...

 Error: [$parse:syntax] 
http://errors.angularjs.org/1.4.0-beta.1/$parse/syntax?p0=%7B&p1=is%20unexpected%2C%20expecting%20%5B)%5D&p2=43&p3=one.greet(%7B'a'%3A's'%2C'd'%3A'f'%7D%2Cfunction(data)%7BreturnNaNalse%3B%7D)&p4=%7Breturn%false%3B%7D)
    at Error (native)
    at 
http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js:6:423
    at ab.throwError 
(http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js:191:42)
    at ab.consume 
(http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js:192:76)
    at ab.functionCall 
(http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js:198:424)
    at ab.primary 
(http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js:190:368)
    at ab.unary 
(http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js:197:355)
    at ab.multiplicative 
(http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js:197:82)
    at ab.additive 
(http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js:196:450)
    at ab.relational 
(http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js:196:316)

-thanks, dp

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to