I use Angular 11 for create my pilet.
At the index.ts of the my app I have
import 'piral/polyfills';
import { PiralPlugin, renderInstance } from 'piral';
import { layout, errors } from './layout';
import { createNgApi } from 'piral-ng';
import * as React from 'react';
const feedUrl = 'https://feed.piral.cloud/api/v1/pilet/empty';
renderInstance({
layout,
errors,
plugins: [createNgApi()],
requestPilets() {
return fetch(feedUrl)
.then((res) => res.json())
.then((res) => res.items);
},
});
At the index.ts of my pilet I have =============>
import { PiletApi } from 'my-app';
import * as React from 'react';
import { fromNg } from 'piral-ng';
import { AngularPage } from './AngularPage';
export function setup(piral: PiletApi) {
piral.registerTile(() => fromNg(AngularPage), {
initialColumns: 2,
initialRows: 1,
});
}
At My AngularPage I Have ==============>
import { Component, Inject } from '@angular/core';
@component({
template: <div class="tile">Hola</div>
,
})
export class AngularPage {
constructor() {}
}
But I have at the next error
"Module '"piral-ng"' has no exported member 'fromNg'"