Skip to content

Commit 579262b

Browse files
author
Grigorii Duca
committed
.
1 parent 4065c2a commit 579262b

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Image lazy loading directive for Angular2
1+
# Image lazy loading for Angular2
22

33
[![npm version](https://badge.fury.io/js/%40greg-md%2Fng-lazy-load.svg)](https://badge.fury.io/js/%40greg-md%2Fng-lazy-load)
44
[![Build Status](https://travis-ci.org/greg-md/ng-lazy-load.svg?branch=master)](https://travis-ci.org/greg-md/ng-lazy-load)
@@ -17,19 +17,19 @@ npm install @greg-md/ng-lazy-load --save
1717
import { BrowserModule } from '@angular/platform-browser';
1818
import { NgModule } from '@angular/core';
1919

20-
// 1. Import lazy loading directive.
21-
import { LazyLoadDirective } from '@greg-md/ng-lazy-load';
20+
// 1. Import lazy loading module.
21+
import { LazyLoadModule } from '@greg-md/ng-lazy-load';
2222

2323
import { AppComponent } from './app.component';
2424

2525
@NgModule({
2626
imports: [
2727
BrowserModule,
28+
// 2. Register lazy loading module.
29+
LazyLoadModule,
2830
],
2931
declarations: [
3032
AppComponent,
31-
// 2. Register lazy loading directive.
32-
LazyLoadDirective,
3333
],
3434
bootstrap: [AppComponent]
3535
})

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
export * from './src/lazy-load.module';
12
export * from './src/lazy-load.directive';

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@greg-md/ng-lazy-load",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Image Lazy loading for Angular2",
55
"repository": {
66
"type": "git",
@@ -23,6 +23,7 @@
2323
"main": "./index.ts",
2424
"devDependencies": {
2525
"@angular/core": "^2.0.0",
26+
"@angular/common": "^2.0.0",
2627
"rxjs": "5.0.0-beta.12",
2728
"zone.js": "^0.6.21"
2829
}

src/lazy-load.module.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { LazyLoadDirective } from './lazy-load.directive';
5+
6+
@NgModule({
7+
imports: [CommonModule],
8+
declarations: [LazyLoadDirective],
9+
exports: [LazyLoadDirective]
10+
})
11+
export class LazyLoadModule { }

0 commit comments

Comments
 (0)