Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 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

    (compare)

  • 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
@logan_aaaflag_gitlab
Does anyone know under what circumstances the viewFactory can be undefined in a @processContent(...) handler?
Caleb Cushing
@xenoterracide
ARGH... this %#$@$@! bug, I'm gonna lose all my hair
now what makes Reflect.decorate happen...
donald-slagle
@donald-slagle
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
@xenoterracide
@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
donald-slagle
@donald-slagle
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
@xenoterracide
anyone know how to actually build the aurelia 2 repo? going to try hacking out a patch...
Caleb Cushing
@xenoterracide
damn, working on this repo is a pita
Chris Matzenbach
@cmatzenbach
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
@cmatzenbach
i'm using mocha/chai/sinon, by the way
bigopon
@bigopon
@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
@lebolo
@bigopon: thanks!
NightWulfe
@NightWulfe

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
@jamesond
@rafatpc Did you happen to figure out your issues with a rest parameter must be of an array type for aurelia-dependency-injection?
NightWulfe
@NightWulfe
No one can offer any ideas as to what may be causing my error?
Pedro Silva
@pmanu93
@bigopon :Thanks!
Luis Lebolo
@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) {
  config.globalResources([
    PLATFORM.moduleName('./elements/resource-1/resource-1'),
    PLATFORM.moduleName('./elements/resource-2/resource-2'),
    PLATFORM.moduleName('./elements/resource-2/resource-3/resource-3'),
    PLATFORM.moduleName('./elements/resource-2/resource-3/inputs/resource-4/resource-4'),
    PLATFORM.moduleName('./elements/resource-2/resource-3/inputs/resource-5/resource-5'),
    PLATFORM.moduleName('./elements/resource-2/resource-3/inputs/resource-6/resource-6'),
    PLATFORM.moduleName('./elements/resource-2/resource-3/inputs/resource-7/resource-7'),
    PLATFORM.moduleName('./elements/resource-2/resource-3/inputs/resource-8/resource-8'),
    PLATFORM.moduleName('./elements/resource-2/resource-3/inputs/resource-9/resource-9'),
    PLATFORM.moduleName('./elements/resource-2/resource-3/inputs/resource-10/resource-10'),
  ]);
}

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

elements:
  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?

NightWulfe
@NightWulfe
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.
TonyLugg
@TonyLugg
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?
bigopon
@bigopon
@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
@alfredlopez

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.

bigopon
@bigopon
@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
Corneliu
@corneliutusnea

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:

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

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
@davidsk
Hi all. Would I be correct in thinking that there's no way to bind to an array element by index? Something like:
//viewModel
class myClass{
   myArray: ['A','B','C']
}

// view
<template>
   <input value.bind="myArray[1]" />
   ${myArray[1]}
</template>
Alfred Lopez
@alfredlopez
Thanks @bigopon
bigopon
@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
@davidsk
@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 :'(
bigopon
@bigopon
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
@khuzemakanore

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

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

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 = '/';

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

    config.fallbackRoute('/');

    this.router = router;
  }
}
WisdomCorp
@WisdomCorp
Hello, what is the Aurelia generator command for creating simple html and ts file? like for element you have
au generate element newelement
bigopon
@bigopon
@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?
WisdomCorp
@WisdomCorp
yes
It will be similiar as element but generate in current directory with basic structure for html ie: <template> ${Your template} </template>) and for ts file ie: export class className { }. Hope I am clear :)
bigopon
@bigopon
well ... maybe put a request in our cli repo? That feature is not there, afaik :smile: