javascript - How to call an angular $scope function using href in angular-kendojs -
i new angular-kendo.js. want phone call function emailclick() href ie.
<a href="javascript:void(0);" k-on-click = "emailclick()">email</a> and controller , route follows :
app.controller('contactctrl', ['$rootscope', '$scope', 'appsvc', function($scope, $rootscope, appsvc) { $scope.emailclick = function() { appsvc.selectitem = 'email'; appsvc.back = true; $rootscope.go('email', 'slideleft'); }; }]); app.config(['$routeprovider', function($routeprovider) { $routeprovider.when('/', { templateurl : 'partials/home.html', controller : 'homectrl' }).when('/email', { templateurl : 'partials/email.html', controller : 'contactctrl' }).otherwise({ templateurl : 'partials/home.html', controller : 'homectrl' }); }]); }()); now on clicking email should go function emailclick() not happpening. there no error , no response. please help.
thanks in advance.
you need utilize ng-click directive,
<a href="javascript:void(0);" ng-click = "emailclick()">email</a> javascript jquery angularjs angularjs-directive angular-kendo
No comments:
Post a Comment