Aurelia 1.x Q&A - Sandbox at https://codesandbox.io/s/aurelia-javascript-sandbox-jnl6q85zq5
bigopon on upgrade-deps
chore: upgrade deps, tweak test… build: refactor build, upgrade … build: prepare release script and 2 more (compare)
dependabot[bot] on npm_and_yarn
chore(deps): bump trim-off-newl… (compare)
dependabot[bot] on npm_and_yarn
chore(deps): bump tar from 4.4.… (compare)
dependabot[bot] on npm_and_yarn
chore(deps): bump trim-off-newl… (compare)
dependabot[bot] on npm_and_yarn
chore(deps): bump aurelia-frame… (compare)
mouseUpEventListener: EventListener = (e: MouseEvent) => { this.mouseCanvas_mouseUp(e); }
this.mouseCanvas.addEventListener('mouseup', this.mouseUpEventListener);
private mouseCanvas_mouseUp(e: MouseEvent) {
if (e.preventDefault) e.preventDefault();
if (e.stopPropagation) e.stopPropagation();
let lePointerEvent = <PointerEvent>{ offsetX: e.offsetX, offsetY: e.offsetY };
this.mouseCanvas_pointerUp(lePointerEvent);
}
Thanks @TonyLugg I was looking for a way to listen to manually dispatched events that aren’t necessarily bound to an element. So if the code has something like
window.dispatchEvent(new CustomEvent(‘dateChanged’,newDate));
I guess, based on your example, I can do
this.addEventListener(‘dateChanged’, this.dateChangedListener);
I just read the documentation regarding function references and I’m a bit confused about callbacks with parameters. Here’s my confusion:
In my parent view, I can have the following:
<my-custom-comp callback.call=“myParentFunction(paramA, paramB)” … >
1) I’m assuming that paramA and paramB are actually bindable fields, but are they of the parent or of the custom element?
2) If they are of the parent, how are they accessed in the custom element so that it can call callback({paramA: <first passed value>, paramB: <second passed value>})
3) If they are of the custom element, then I’m going to assume that I can make the call like callback({paramA: this.paramA, paramB: this.paramB})
4) How is myParentFunction defined in the parent? Like so?
myParentFunction(arbitraryParamNameA, arbitraryParamNameB)
Thanks!
Ok…so I searched through discourse and found this post —> https://discourse.aurelia.io/t/call-function-from-custom-element/1793
Which kinda answres my question. Thanks y’all! :-)
Hi all - this is a sort of Aurelia-related question. If you look inside a lot of node_modules
package folders - let's take aurelia-fetch-client
for example - in the dist
folder there are various targets, e.g. amd
, commonjs
, system
, 2015
, umd
, etc. My question is, how does a bundler e.g. webpack choose which one to load? Is it a webpack thing, or a tsconfig thing (I'm using TypeScript). I'm really hazy on which part of the toolchain is doing this.
My problem is I have a bundle that's broken in IE11. I can see that its contents includes code straight out of aurelia-pal-browser/dist/es2015
which IE is not going to handle very well.
new AureliaPlugin({
dist: 'es2015'
})
Hello @bigopon , I have a component which has a css in require that is overriding some of the core bootstrap classes..
now since I am opening this component in new tab, it is not overriding style for other pages
--- this is existing functionality ---
now I have to use this same component in a dialog and when I am loading this component in dialog it is overriding styles for the whole page - colors fonts etc.
how can I stop this. Any help will be appreciated.
model.bind
?