I have AngularJS 1.8.3 app with controller-styled (not components) elements. I have a page for uploading files for products with the following template and controller:
.controller('UploadController', ['$scope', ($scope) => {
$scope.log = function (event) {
console.log('Event asd', event)
}
}
<div class="col-md-6" ng-controller="UploadController">
<adob-dropzone ng-on-asd="log('test')">
</adob-dropzone>
</div>
adob-dropzone is the embedded Angular v14 WebComponent, wrapped with Angular Elements.
It's code:
import {Component, EventEmitter, Output} from '@angular/core';
import {NgxDropzoneChangeEvent} from "ngx-dropzone";
@Component({
selector: 'adob-dropzone',
templateUrl: './app.component.html',
})
export class AppComponent {
@Output() asd = new EventEmitter<boolean>();
onSelect(event: NgxDropzoneChangeEvent) {
console.log('On Select!');
this.asd.emit(true);
}
}
The example is simplified. The goal is to catch the asd named event in the parent AngularJS app.
The onSelect function runs as expected