File tree Expand file tree Collapse file tree 4 files changed +19
-6
lines changed Expand file tree Collapse file tree 4 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1
- # Image lazy loading directive for Angular2
1
+ # Image lazy loading for Angular2
2
2
3
3
[ ![ npm version] ( https://badge.fury.io/js/%40greg-md%2Fng-lazy-load.svg )] ( https://badge.fury.io/js/%40greg-md%2Fng-lazy-load )
4
4
[ ![ 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
17
17
import { BrowserModule } from ' @angular/platform-browser' ;
18
18
import { NgModule } from ' @angular/core' ;
19
19
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' ;
22
22
23
23
import { AppComponent } from ' ./app.component' ;
24
24
25
25
@NgModule ({
26
26
imports: [
27
27
BrowserModule ,
28
+ // 2. Register lazy loading module.
29
+ LazyLoadModule ,
28
30
],
29
31
declarations: [
30
32
AppComponent ,
31
- // 2. Register lazy loading directive.
32
- LazyLoadDirective ,
33
33
],
34
34
bootstrap: [AppComponent ]
35
35
})
Original file line number Diff line number Diff line change
1
+ export * from './src/lazy-load.module' ;
1
2
export * from './src/lazy-load.directive' ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @greg-md/ng-lazy-load" ,
3
- "version" : " 1.0.2 " ,
3
+ "version" : " 1.0.3 " ,
4
4
"description" : " Image Lazy loading for Angular2" ,
5
5
"repository" : {
6
6
"type" : " git" ,
23
23
"main" : " ./index.ts" ,
24
24
"devDependencies" : {
25
25
"@angular/core" : " ^2.0.0" ,
26
+ "@angular/common" : " ^2.0.0" ,
26
27
"rxjs" : " 5.0.0-beta.12" ,
27
28
"zone.js" : " ^0.6.21"
28
29
}
Original file line number Diff line number Diff line change
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 { }
You can’t perform that action at this time.
0 commit comments