Skip to content

Commit

Permalink
feat(demo): improve docs, add download badge
Browse files Browse the repository at this point in the history
  • Loading branch information
tomastrajan committed Feb 13, 2020
1 parent 0cda94e commit 8f0fe6c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
(isResponsiveLayout | async) ? '' : '@angular-extensions/'
}}elements</span
>
<img
*ngIf="!(isResponsiveLayout | async)"
alt="downloads per month"
src="https://img.shields.io/npm/dm/@angular-extensions/elements"
/>
<iframe
*ngIf="!(isResponsiveLayout | async)"
allowtransparency="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ iframe {
margin: 0 0 0 10px;
}

img {
margin: 0 0 0 10px;
}

:host-context(.responsive) {
.spacer-responsive {
flex: 1 0 auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,24 @@ export class HomeComponent implements OnInit {

const CODE_EXAMPLE_COMPONENT = `@Component({
selector: 'your-org-feature',
template: '<some-element *axLazyElement="elementUrl"></some-element>'
template: \`
<!-- will be lazy loaded and uses standard Angular template bindings -->
<some-element
*axLazyElement="elementUrl"
[data]="data"
(dataChange)="handleChange($event)"
>
</some-element>
\`
})
export class FeatureComponent {
elementUrl = 'https://your-org.com/elements/some-element.js';
data: SomeData;
handleChange(change: Partial<SomeData>) {
// ...
}
}
`;

Expand Down

0 comments on commit 8f0fe6c

Please sign in to comment.