Closed MickL closed 7 years ago
Probably npm version is not correct. I don't see any decorators like @Directive
or @Component
.
Addition: Not sure why but npm install https://github.com/brtnshrdr/angular2-image-zoom.git
is not adding any ts files (index.ts and src/*.ts).
Adding it manually worked:
import {ImageZoomModule} from "../temp/angular2-image-zoom/index";
@NgModule({
imports: [ImageZoomModule]
});
Don't install it from github. Just install from NPM
'npm install angular2-image-zoom' Then import 'import {ImageZoomModule} from 'angular2-image-zoom'
GitHub doesn't have the correct files
The first comment was about npm install angular2-image-zoom
. Second comment was just an addition. Please reopen: npm files don't have any decorators.
Decorators won't exist in the compiled files. I'm using this project with angular 2.4.7 just fine.
Still didn't work for me. I ended up using a plain JS-libary instead und let it run out of Angular zone because this projects triggers change detection too often. Using the directive on base64 image leads to massive lags.
Added "ImageZoomModule" to imports as described in readme. Error:
Can't bind to 'imageZoom' since it isn't a known property of 'img'
Using latest Angular-CLI (beta 31) with Angular 2.4.x