Hello everyone, I am going to share the code-sample for call function on page load in angular , The example for the same as given below. The live plunker URL http://embed.plnkr.co/C2stGb/ HTML code-sample < div ng-app ="pageLoadApp" ng-controller ="pageLoadAppCtrl"> < div data-ng-init ="onloadFun()"> < a href ="http://www.code-sample.com/" target ="_blank"> Welcome you! </ a > </ div > </ div > AngularJs code-sample var app = angular.module( 'pageLoadApp' , []); app.controller( 'pageLoadAppCtrl' , [ "$scope" , function ($scope) { $scope.onloadFun = function () { alert(1); } }]); Full Running code as given below < !DOCTYPE html > < html > < head > < meta charset ="utf-8" /> < title > angularjs call function on page loa...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers