I have to make something like global function, but im making mistake somewhere, could anyone see and help me fix this:
 <div>
 <p class="comment-name">{{getName}}</p>
            <p class="comment-mail">{{getMail}}</p>
        <div class="comment_content">
            <p class="comment-com">{{getComm}}</p>
            <button class="post-comm" ng-click="postCom()">Post</button>
 
    </div>AngularJS:
myApp.run(function ($rootScope) {
     $rootScope.postCom = function () {
         $rootScope.getName = $rootScope.name;
         $rootScope.getMail = $rootScope.mail;
         $rootScope.getComm = $rootScope.comment;
     };
 });