just like to know about few line like what they does.
- app.directive('fancybox', function($compile) {
- return {
- restrict: 'A',
- replace: false,
- link: function($scope, element, attrs) {
- $scope.open_fancybox = function() {
- var el = angular.element(element.html()),
- compiled = $compile(el);
- $.fancybox.open(el);
- compiled($scope);
- };
- }
- };
- });
below these lines are not clear.var el = angular.element(element.html()),
- compiled = $compile(el);
- $.fancybox.open(el);
- compiled($scope);
i have test the if i comment this line compiled($scope); then value is not putting into expression.......why ?
please guide me in detail. thanks
Posted Jun 6, 2017, 7:03 AM
Vivek KumarPosted Jun 2, 2017, 3:27 PM