Skip to main content

Posts

Showing posts with the label angularjs difference between link and controller

angularjs difference between link and controller

Hello everyone, I am going to share the code sample for differentiate to link and controller . Link : The link is a function and use to attached handlers and also use for DOM  elements modification. Controller : The controller is use to share the $scope data within the scope and also provide the ways of linking the DOM elements. Table of Contents            HTML code sample for link vs. controller              AngularJs code sample for link vs. controller Full (HTML+ AngularJs) code sample for link vs. controller Live demo link   http://embed.plnkr.co/cbsRod/preview HTML code sample for link vs. controller < div ng-app ="linkApp">     < div ng-controller ="linkCtrl">         < link-directive ></ link-directive >     </ div > </ div > AngularJs code sample for link vs. ...