Aurelia 1.x Q&A - Sandbox at https://codesandbox.io/s/aurelia-javascript-sandbox-jnl6q85zq5
bigopon on 4.0.3
bigopon on master
chore(release): prepare release⦠(compare)
bigopon on 4.0.2
bigopon on master
chore(release): prepare release⦠(compare)
import * as environment from "../config/environment.json";
import { PLATFORM } from "aurelia-pal";
import { CustomElementRegistry } from "aurelia-web-components";
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.globalResources("resources/elements/message-parts");
// .feature(PLATFORM.moduleName('resources/index'));
aurelia.use.developmentLogging(environment.debug ? "debug" : "warn");
if (environment.testing) {
aurelia.use.plugin(PLATFORM.moduleName("aurelia-testing"));
}
aurelia
.start()
.then(() => {
const registry = aurelia.container.get(CustomElementRegistry);
registry.useGlobalElements();
})
.then(() => aurelia.setRoot(PLATFORM.moduleName("app")));
}
I am trying to upgrade aurelia-templating-resources from 1.6.0 -> 1.13.1 to get the fix for the race condition when composing a UI (PR: aurelia/templating-resources#345) - it is throwing an exception when it calls configure.globalResources (Invalid resource path [function Compose(element, container, compositionEngine, viewSlot, viewResources, taskQueue)). I am wondering if I need to upgrade other dependencies along with the aurelia-templating-resources upgrade.
This is the aurelia section of my package.json:
"aurelia-animator-css": "1.0.4",
"aurelia-bootstrapper-webpack": "1.1.0",
"aurelia-configuration": "1.0.17",
"aurelia-event-aggregator": "1.0.1",
"aurelia-fetch-client": "1.1.3",
"aurelia-framework": "1.3.1",
"aurelia-history-browser": "1.1.1",
"aurelia-http-client": "1.2.1",
"aurelia-i18n": "1.6.2",
"aurelia-loader-webpack": "2.1.0",
"aurelia-logging-console": "1.0.0",
"aurelia-pal-browser": "1.8.0",
"aurelia-polyfills": "1.3.4",
"aurelia-route-recognizer": "1.1.1",
"aurelia-router": "1.5.0",
"aurelia-templating-binding": "1.4.1",
"aurelia-templating-resources": "1.13.1",
"aurelia-templating-router": "1.3.1",
thank you
In the end I used an eventListener on the scroll of the page, https://ilikekillnerds.com/2016/02/using-event-listeners-in-aurelia/
together with adding a class to the element, whenever
elements[i].getBoundingClientRect().top - windowHeight <= 0
https://www.dev-tips-and-tricks.com/animate-elements-scrolled-view-vanilla-js
Also I tried using scrolltop.bind="scrolltop" but that never worked so.
Hi all, I would like to write agnostic js code for a design system components (e.g. dropdown) that could be used in Aurelia and VueJS. Example agnostic code:
element = document.createElement('div')
element.addEventListener('click', () => console.log('foo'))
Do you guys know if I can somehow use that in Aurelia?