s-yadav / patternLock

A light weight plugin to simulate android like pattern lock interface for your hybrid app or website.
MIT License
378 stars 141 forks source link

Not working on Ionic2 #24

Open avongeric opened 6 years ago

avongeric commented 6 years ago

I tried using this in my ionic app as I also include jquery library. Below is was I did;

  1. npm install patternlock
  2. import * as patternLock from 'PatternLock';
  3. npm install jquery
  4. import $ from "jquery";

With the above, I do the initialization like this but nothin work. It just some the SVG tag I included on the html which doesnt enable me to draw the pattern:

var lockset = new patternLock("#patternHolder7", { onPattern: function (pattern) { // Context is the pattern lock instance console.log(pattern) } }); capture

malkafly commented 6 years ago

same here

Malkiat-Singh commented 5 years ago

Hi @malkafly @ericxander I have import this like

import PatternLock from 'patternlock';

also jquery npm installed

and copy the css from patternlock node module to the same page like lockPage.ts in ngAfterViewInit(): any { this.lockset = new PatternLock("#patternHolder7", { matrix: [4, 4] }); }

Its working awesome