33[ ![ Build Status] [ travis-badge ]] [ travis ]
44[ ![ Coverage Status] [ coveralls-badge ]] [ coveralls ]
55[ ![ Commitizen friendly] [ commitizen-badge ]] [ commitizen ]
6+ [ ![ code style: prettier] [ prettier-badge ]] [ prettier-badge-url ]
67
78This project was generated with [ Angular CLI] [ angular-cli ] version 1.6.6.
89
@@ -21,6 +22,7 @@ This is a simple library for [Angular][angular], implemented in the [Angular Pac
2122` yarn add @thisissoon/angular-masonry masonry-layout `
2223
2324` app.module.ts `
25+
2426``` ts
2527import { MasonryModule } from ' @thisissoon/angular-masonry' ;
2628
@@ -29,24 +31,25 @@ const masonryProviders = [
2931];
3032
3133@NgModule ({
32- imports: [
33- MasonryModule .forRoot (masonryProviders )
34- ]
34+ imports: [MasonryModule .forRoot (masonryProviders )]
3535})
36- export class AppModule { }
36+ export class AppModule {}
3737```
3838
3939` angular.json `
4040
4141Add the Masonry library javascript to your angular cli config
42+
4243``` ts
4344" scripts" : [
4445 " ../node_modules/masonry-layout/dist/masonry.pkgd.js"
4546],
4647```
4748
4849#### Universal app (only needed if using platform-server)
50+
4951` app.server.module.ts `
52+
5053``` ts
5154import { MasonryModule } from ' @thisissoon/angular-masonry' ;
5255
@@ -57,7 +60,7 @@ import { MasonryModule } from '@thisissoon/angular-masonry';
5760 MasonryModule .forRoot ()
5861 ]
5962})
60- export class AppServerModule { }
63+ export class AppServerModule {}
6164```
6265
6366## Example
@@ -68,15 +71,13 @@ A full working example can be found in the [src/app](https://github.com/thisisso
6871
6972``` ts
7073export class AppComponent implements AfterViewInit , OnDestroy {
71-
72- @ViewChild (' grid' )
73- public grid: ElementRef ;
74+ @ViewChild (' grid' ) public grid: ElementRef ;
7475
7576 public masonryInstance: MasonryInstance ;
7677
7778 public cards = cards ;
7879
79- constructor (@Inject (Masonry ) public masonry ) { }
80+ constructor (@Inject (Masonry ) public masonry ) {}
8081
8182 ngAfterViewInit() {
8283 const options: MasonryOptions = {
@@ -99,7 +100,9 @@ export class AppComponent implements AfterViewInit, OnDestroy {
99100```
100101
101102### ` app.component.css `
103+
102104Styling is just an example
105+
103106``` css
104107:host {
105108 display : block ;
@@ -118,6 +121,7 @@ Styling is just an example
118121```
119122
120123### ` app.component.html `
124+
121125``` html
122126<div class =" grid" #grid >
123127 <div class =" card" *ngFor =" let card of cards" >
@@ -164,15 +168,17 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C
164168
165169[ travis ] : https://travis-ci.org/thisissoon/angular-masonry
166170[ travis-badge ] : https://travis-ci.org/thisissoon/angular-masonry.svg?branch=master
167- [ coveralls ] :https://coveralls.io/github/thisissoon/angular-masonry?branch=master
168- [ coveralls-badge ] :https://coveralls.io/repos/github/thisissoon/angular-masonry/badge.svg?branch=master
169- [ commitizen ] :http://commitizen.github.io/cz-cli/
170- [ commitizen-badge ] :https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
171- [ conventional-changelog ] :https://github.com/conventional-changelog/conventional-changelog
172- [ standard-version ] :https://github.com/conventional-changelog/standard-version
173- [ Karma ] :https://karma-runner.github.io
174- [ Protractor ] :http://www.protractortest.org/
171+ [ coveralls ] : https://coveralls.io/github/thisissoon/angular-masonry?branch=master
172+ [ coveralls-badge ] : https://coveralls.io/repos/github/thisissoon/angular-masonry/badge.svg?branch=master
173+ [ commitizen ] : http://commitizen.github.io/cz-cli/
174+ [ commitizen-badge ] : https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
175+ [ prettier-badge ] : https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=shield
176+ [ prettier-badge-url ] : https://github.com/prettier/prettier
177+ [ conventional-changelog ] : https://github.com/conventional-changelog/conventional-changelog
178+ [ standard-version ] : https://github.com/conventional-changelog/standard-version
179+ [ karma ] : https://karma-runner.github.io
180+ [ protractor ] : http://www.protractortest.org/
175181[ angular ] : https://angular.io/
176- [ angular-cli ] :https://github.com/angular/angular-cli
177- [ angular-cli-readme ] :https://github.com/angular/angular-cli/blob/master/README.md
178- [ masonry ] :https://masonry.desandro.com/
182+ [ angular-cli ] : https://github.com/angular/angular-cli
183+ [ angular-cli-readme ] : https://github.com/angular/angular-cli/blob/master/README.md
184+ [ masonry ] : https://masonry.desandro.com/
0 commit comments