Skip to content

Not working in angular 4 #10

@vishalbiradar

Description

@vishalbiradar

I have installed your plugin and then tried to use it in one of my components, but it is not working.

new.component.ts


import * as $ from 'jquery';
window['$'] = window['jQuery'] = $;

ngOnInit() {
        $(document).ready(function(){
            $('#mybtn123').click(function(){
                alert('The mybtn123 was clicked.');
                $('#svgContainer').HTMLSVGconnect({
                    stroke: '#000',
                    strokeWidth: 8,
                    orientation: 'auto',
                    paths: [
                        {start: '#source0', end: '#target1', strokeWidth: 4, stroke: '#10D8A1'},
                        {start: '#source1', end: '#target1', strokeWidth: 4, stroke: '#10D8A1'}
                    ]
                });
            });
        });
    }

I am getting the error.
Error:

errors.ts:42 ERROR TypeError: $(...).HTMLSVGconnect is not a function

Please help me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions