Category : angular

I use Mercure with Symfony4 and Angular9. On the click event of a button, I publish the Mercure update : In the component.html : <button (click)="insertSynonyme()" class="btn btn-default mb-2">Save</button> In the component.ts : constructor( … private mercureServ: MercureService, … ) { … } … insertSynonyme(){ const data = { old_cle: this.synoForm.value.cle_syno, add_synonymes: this.dataSynonyme.oldSynonyme }; // ..

Read more

I have symfony5/angular10 project, in angular three components: categories (which I use to create a menu – simple list of categories), adverts (list all adverts), single advert (shows advert by id). Based on these components in app-routing I got three routes: { path: ‘adverts’, component: AdvertsComponent }, { path: ‘advert/category/:name’, component: AdvertsComponent }, { path: ..

Read more

I am creating a website with symfony and angular. I would like to export a PDF with Html2PDF. But I get an error: Access to XMLHttpRequest at ‘http://localhost/pdf’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.** here is my code public function index(): string { ..

Read more