0.0.5 • Published 2 years ago

initial-components-ori v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

See it in action

This is a simple project that calls the Reddit r/images API and displays a list of cards. The two components are 'Background-component' and 'item-component'. the Background maps through the data received form Reddit and generates the same number of 'items'.

Getting the component

In your Ionic project install this npm package initial-components-ori

npm install initial-components-ori

Using the custom component

Inside main.ts add the import

import { defineCustomElements } from 'initial-components-ori/loader';

and below...

defineCustomElements(window);

Inside the module.ts folder of the page where you would like to use the component add

import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
---
@NgModule({
  imports: [CommonModule, FormsModule, IonicModule, StencilPageRoutingModule],
  declarations: [StencilPage],
 --> schemas: [CUSTOM_ELEMENTS_SCHEMA],<--
})

To use this component, just use it like any other HTML element, and include a valid reddit url

<background-component urls="https://www.reddit.com/r/Images.json?raw_json=1"> </background-component>

Thanks

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago