M
M
MOTORIST2015-01-17 15:26:11
JavaScript
MOTORIST, 2015-01-17 15:26:11

How to attach jquery gallery to angular? The problem is href. ng-href doesn't solve.?

Hello!
If ng-href , then I get 404 (undefined). So he is looking for href and cannot find it.
If I write href , I get 404 photo/photos/%7B%7BurlName%7D%7D
Directive

.directive('imggellary', function() {
        return {
            template: '<a ng-href="{{urlName}}"></a>',
            replace:true,
            scope: {
                urlName: '@url'
            },
            link: function (scope, element, attrs) {
                var settings = {
                    monitor: {
                        thumbs: {
                            position: 'left',
                            cacheItems:20
                        }
                    },
                    pluginPath:'/zoomscript'
                };
                element.zoomscript(settings);
            }
        };
    })

Initialization
<a imggellary url="/uploads/photoalbums/{{photo.id_album}}/random/{{photo.name}}" class="ui inverted button"></a>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2015-01-22
@AndyGrom

It seems to me that you are doing the urlName interpolation in the template in vain.
Try
<a ng-href="urlName"></a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question