angularjs - Why does the following URL return $santize:badparse -


i need fire ng-click when bind following

<a href='#' ng-click ='gotourl('www.cnn.com')'>cnn</a>  

i $santize:badparse

what doing wrong?

see this.

http://jsfiddle.net/jigardafda/08k1ztsa/1/

js

var myapp = angular.module('myapp', []);      myapp     .controller('myctrl', function($scope){         $scope.gotourl = function(url){             window.open(url);         };     }); 

html

<div ng-app="myapp">     <div ng-controller = "myctrl">         <a href='#' ng-click ='gotourl("http://www.cnn.com")'>cnn</a>     </div> </div> 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -