Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Oct 22 01:05

    EisenbergEffect on master

    Update origin.js Fix to https:… Update origin.js Updated `var`… fix(platform): Get rid of _'win… (compare)

  • Oct 22 01:05
    EisenbergEffect closed #65
  • Oct 21 21:08
    fkleuver closed #168
  • Oct 20 22:46
    3cp commented #168
  • Oct 20 22:45
    3cp commented #1186
  • Oct 20 18:43
    josundt commented #65
  • Oct 20 13:33

    EisenbergEffect on master

    chore(release): prepare release… (compare)

  • Oct 20 13:33

    EisenbergEffect on 2.2.2


  • Oct 20 13:32

    EisenbergEffect on master

    chore(release): prepare build (compare)

  • Oct 20 07:52
    rmja opened #667
  • Oct 17 13:19
    bigopon commented #178
  • Oct 17 13:16
    SabineWren commented #178
  • Oct 17 13:02
    bigopon commented #178
  • Oct 17 12:51
    SabineWren commented #178
  • Oct 17 12:42
    SabineWren commented #178
  • Oct 17 12:40
    SabineWren commented #178
  • Oct 16 08:51
    bigopon commented #775
  • Oct 16 08:36
    ccantill commented #775
  • Oct 16 08:22
    bigopon commented #775
  • Oct 16 08:17
    ccantill commented #775
Logan AAA Flag
Hey bit of a long shot but I have a @processContent(...) decorator within which I'm trying to register a custom component (like this example in the docs https://aurelia.io/docs/templating/custom-elements#decorators-for-customizing-aurelia-custom-element-processing sandbox link https://codesandbox.io/s/p7wo71qrzj?from-embed )
But when I call resources.registerElement( "icon-list-item", instruction.type["viewFactory"].resources.getElement("icon-list-item") );
I get an error ERROR [templating] TypeError: Cannot read property 'resources' of undefined
Does anyone know under what circumstances the viewFactory can be undefined in a @processContent(...) handler?
Caleb Cushing
ARGH... this %#$@$@! bug, I'm gonna lose all my hair
now what makes Reflect.decorate happen...
Is it possible to limit a route parameter? I've got a top level route that can take an id and I'd like to limit that route to just integers. I'm integrating vanity URLs for affiliates and that top level route is catching everything. I know in ASP.NET I can do something like [HttpGet("{id:int}")]. Having something like that would take care of it or being able to define a regex for a route param would also take care of it.
Caleb Cushing
@donald-slagle I thought you could, but I can't find anything that suggests anything other than these https://aurelia.io/docs/fundamentals/cheat-sheet#routing
I would totally love a regex pattern matching router in 2, you should open a ticket or something
Yeah it would be a great feature. I think I'm going to have to convert my current route that takes an int Id to a query string param so my vanity URL can work. Only issue is I have to push a mobile app update to keep that int Id working properly but backwards compatibility for people that haven't upgraded will stop working. Might have to keep digging for a solution.
Caleb Cushing
anyone know how to actually build the aurelia 2 repo? going to try hacking out a patch...
Caleb Cushing
damn, working on this repo is a pita
Chris Matzenbach
hey, i have a quick question - how does one go about testing modals, since they won't have an inView property as they are called directly from a a view-model (at least ours are, via functions tied to buttons in the view and whatnot)
or i guess in the aurelia terminology they are called dialogs. how do you test dialogs?
Chris Matzenbach
i'm using mocha/chai/sinon, by the way
@CapnKernel you can create a simple element that invoke the modal
@xenoterracide what pita? Installation time? Or other issues?
@donald-slagle it was planned at some point, but was never acted pn. Probably it has more chance landing on v2. Can you help open a ticket in https://github.com/aurelia/aurelia
@lebolo it wont be called. But theres a way to make aurelia invoke the lifecycle by just adding removing the element via aurelia web component. Maybe try that?
@pmanu93 by default, Aurelia invokes preventDefault on all listener if the event handler does not return true. So in the click handler of li element, you just need to return true
Luis Lebolo
@bigopon: thanks!

Hello. I used the information in the manual for setting up a simple aurelia with webpack, without using aurelia-cli. When I run npx webpack to build the project, I get this error:

ERROR in multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-boostrapper Module not found: Error: Can't resolve 'aurelia-webpack-plugin/runtime/empty-entry' in '' @ multi-aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-load-entry aurelia-bootstrapper main[0]1
I've tried installing aurelia-pal-browser and aurelia-pal-nodejs with no change. Any ideas?

Jameson Strocsher
@rafatpc Did you happen to figure out your issues with a rest parameter must be of an array type for aurelia-dependency-injection?
No one can offer any ideas as to what may be causing my error?
Pedro Silva
@bigopon :Thanks!
Luis Lebolo

Is there a limit to the number of global resources I can register? I have a resources/index.ts that looks like

import {FrameworkConfiguration, PLATFORM} from 'aurelia-framework';

export function configure(config: FrameworkConfiguration) {

But when I inject ViewResources into my app.ts constructor and print it out, I get

  compose: HtmlBehaviorResource {elementName: "compose", attributeName: null, attributeDefaultBindingMode: undefined, liftsContent: false, targetShadowDOM: false, …}
  resource-2: HtmlBehaviorResource {elementName: "resource-2", attributeName: null, attributeDefaultBindingMode: undefined, liftsContent: false, targetShadowDOM: false, …}
  resource-1: HtmlBehaviorResource {elementName: "resource-1", attributeName: null, attributeDefaultBindingMode: undefined, liftsContent: false, targetShadowDOM: false, …}
  resource-4: HtmlBehaviorResource {elementName: "resource-4", attributeName: null, attributeDefaultBindingMode: undefined, liftsContent: false, targetShadowDOM: false, …}
  resource-3: HtmlBehaviorResource {elementName: "resource-3", attributeName: null, attributeDefaultBindingMode: undefined, liftsContent: false, targetShadowDOM: false, …}
  router-view: HtmlBehaviorResource {elementName: "router-view", attributeName: null, attributeDefaultBindingMode: undefined, liftsContent: false, targetShadowDOM: false, …}

I confirmed that they all exist and can be found. Weirdly, if I comment out the resource-4 line in index.ts then ViewResources will just show resources 1, 2, 3 & 5 instead. Is there a limit?

Yesterday I had a problem where webpack was reporting an error about being unable to resolve empty-entry when doing npx webpack. Either no one was willing to help, or they just didn't know the issue. I finally figured it out, so I'll post it here in the off chance anyone else runs into the problem: Make sure there are periods prefixed to the resolve extensions in your webpack config.
Using Aurelia Dialog 2.0.0, the ux-dialog has fit-content for height and width, which works well in Chrome and Firefox but Edge does not like it. Is there a fix?
@lebolo there shouldn't be a limit, maybe there's something wrong inside those registration?
@NightWulfe we are trying to migrate the community over discord https://discord.gg/MfzdX9s, and discourse https://discourse.aurelia.io/
Please post your Q there for faster response. For your particular error, I remember seeing them but I'm not sure how to resolve it
Alfred Lopez

Quick question…

if I have something like

@connectTo<State>( {
     selector: {
           myStateVar: ….

Do I still have to create the property myStateVar? I’ve been applying the @ts-ignore everywhere I have this.myStateVar.

@alfredlopez you don't have to. But it doesn't really hurt to declare it for the purpose of documentation and readability/maintainability
a simple comment where its value comes from should be awesome for the next time someone reads it

Guys, is there an event in my MV where I know for sure that the child view-models are already created? E.g. I have this view:

<child view-model.ref="childView"></child>

Now I find myself in the parent view in various events (e.g. bind, activated or attached) in which the this.childView is always null. If I set a timeout and check at some point in the future I can see it's created and available but I can't find any predictability to when that will be available. Thoughts?

Keith Davidson
Hi all. Would I be correct in thinking that there's no way to bind to an array element by index? Something like:
class myClass{
   myArray: ['A','B','C']

// view
   <input value.bind="myArray[1]" />
Alfred Lopez
Thanks @bigopon
@kensign not in v1, as Aurelia in v1 doesnt observe index. Though it can be made to work. Maybe create a topic on discourse or a feature request on github?
Keith Davidson
@bigopon I assume you're referencing my question about arrays and indexing. I did eventually find some info on using the mutator methods to manipulate the array which seems to work okay. This doesn't seem to be documented in the docs though :'(
Yeah, we have some minor hiccups like this in the doc
Well I should learn to incorporate complains into doc
@corneliutusnea if you declared childView as @observable, then you can react to childView readiness in childViewChanged?
Khuzema Kanore

Hello guys, I have below statement (using typescript)

      getAllUsers(): UserProfile {
      return this._httpClient.fetch(Constants.apiRoot + 'Account/Users');

The above statement is giving error. How should I construct the above statement so its satisfy the typescript requirement for typecasting the UserProfile as a return result. Thanks

@khuzemakanore you can do:
getAllUsers(): UserProfile {
  return this._httpClient.fetch(Constants.apiRoot + 'Account/Users').then(r => r.json());

i am trying to run a new app i'm working on, and i've got the following error:

aurelia-logging-console.js?dc89:45 ERROR [app-router] Error: Route not found: /
at AppRouter.Router._createNavigationInstruction (aurelia-router.js?e32b:957)
at AppRouter.loadUrl (aurelia-router.js?e32b:2020)
at BrowserHistory._loadUrl (aurelia-history-browser.js?d627:262)
at BrowserHistory.activate (aurelia-history-browser.js?d627:156)
at AppRouter.activate (aurelia-router.js?e32b:2091)
at AppRouter.registerViewPort (aurelia-router.js?e32b:2068)
at new RouterView (aurelia-templating-router.js?ab30:59)
at Object.invoke (aurelia-dependency-injection.js?dd4f:384)
at InvocationHandler.invoke (aurelia-dependency-injection.js?dd4f:357)
at Container.invoke (aurelia-dependency-injection.js?dd4f:543)
error @ aurelia-logging-console.js?dc89:45
eval @ aurelia-logging.js?30fd:38
eval @ aurelia-router.js?e32b:2023
Promise.catch (async)
AppRouter.loadUrl @ aurelia-router.js?e32b:2022
BrowserHistory._loadUrl @ aurelia-history-browser.js?d627:262
BrowserHistory.activate @ aurelia-history-browser.js?d627:156
AppRouter.activate @ aurelia-router.js?e32b:2091
AppRouter.registerViewPort @ aurelia-router.js?e32b:2068
RouterView @ aurelia-templating-router.js?ab30:59
invoke @ aurelia-dependency-injection.js?dd4f:384
InvocationHandler.invoke @ aurelia-dependency-injection.js?dd4f:357
Container.invoke @ aurelia-dependency-injection.js?dd4f:543
get @ aurelia-templating.js?8628:2281
Container.get @ aurelia-dependency-injection.js?dd4f:498
elementContainerGet @ aurelia-templating.js?8628:2336
create @ aurelia-templating.js?8628:4362
applyInstructions @ aurelia-templating.js?8628:2446
create @ aurelia-templating.js?8628:2667
create @ aurelia-templating.js?8628:4374
eval @ aurelia-templating.js?8628:4870
Promise.then (async)
createController @ aurelia-templating.js?8628:4869
_createControllerAndSwap @ aurelia-templating.js?8628:4828
compose @ aurelia-templating.js?8628:4930
compose @ aurelia-templating.js?8628:5196
setRoot @ aurelia-framework.js?0682:113
eval @ main.js?56d7:66
Promise.then (async)
configure @ main.js?56d7:55
eval @ aurelia-bootstrapper.js?6fd9:128
Promise.then (async)
config @ aurelia-bootstrapper.js?6fd9:123
eval @ aurelia-bootstrapper.js?6fd9:159
Promise.then (async)
bootstrap @ aurelia-bootstrapper.js?6fd9:158
eval @ aurelia-bootstrapper.js?6fd9:145
Promise.then (async)
run @ aurelia-bootstrapper.js?6fd9:140
eval @ aurelia-bootstrapper.js?6fd9:165
eval @ b9nV:143
b9nV @ vendors~0ba1d959.2232acfea14b69620719.chunk.js:23
webpack_require @ runtime~app.2232acfea14b69620719.bundle.js:80
0 @ app~f075b844.2232acfea14b69620719.chunk.js:13
webpack_require @ runtime~app.2232acfea14b69620719.bundle.js:80
checkDeferredModules @ runtime~app.2232acfea14b69620719.bundle.js:46
webpackJsonpCallback @ runtime~app.2232acfea14b69620719.bundle.js:33
(anonymous) @ app~f075b844.2232acfea14b69620719.chunk.js:1
aurelia-logging-console.js?dc89:45 ERROR [app-router] Router navigation failed, and no previous location or fallbackRoute could be restored.

code from app.js

import {PLATFORM} from 'aurelia-framework';

export class App {
  configureRouter( config, router )
    config.title = 'ARIS';
    config.options.pushState = true;
    config.options.root = '/';

      {route: '', moduleId: PLATFORM.moduleName('home'), nav: true, title: 'home'},
      {route: 'search', moduleId: PLATFORM.moduleName('search'), nav: true, 
        title: 'Search/Worklist'},


    this.router = router;
Hello, what is the Aurelia generator command for creating simple html and ts file? like for element you have
au generate element newelement
@rhysshadow the API is config.mapUnknownRoutes instead of fallbackRoute
for your Q, the string you pass to mapUnknownRoutes is the path to the view model you want to use, not a redirect URL
@WisdomCorp you meant create a pair, but not for an element?