Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 09 09:38

    bigopon on master

    build: use gh action (compare)

  • Sep 09 09:36

    bigopon on 2.2.5

    (compare)

  • Sep 09 09:36

    bigopon on master

    chore: update maintainer script… chore(release): prepare release… (compare)

  • Sep 09 09:23
    bigopon commented #62
  • Sep 09 09:18

    bigopon on master

    Remove /*# sourceURL= */ from c… circleci: use npm ci instead of… build: use node 16 in circleci and 2 more (compare)

  • Sep 09 09:18
    bigopon closed #61
  • Sep 09 09:18
    bigopon closed #62
  • Sep 09 09:17
    bigopon synchronize #62
  • Sep 09 09:15
    bigopon synchronize #62
  • Sep 08 14:39
    m-gallesio commented #386
  • Sep 08 14:39
    m-gallesio closed #386
  • Sep 08 13:43
    josundt commented #62
  • Sep 08 13:35
    josundt commented #62
  • Sep 08 13:13
    josundt commented #62
  • Sep 08 13:11
    josundt commented #62
  • Sep 08 13:10
    josundt synchronize #62
  • Sep 08 13:09
    bigopon commented #62
  • Sep 08 13:05
    josundt commented #62
  • Sep 08 12:56
    bigopon commented #62
  • Sep 08 12:53
    josundt commented #62
Søren Müller
@SorenMuller
in aurelia.json
..
"dependencies": {
"aurelia-animator-css": "^1.0.0-rc.1.0.0",
"aurelia-bootstrapper": "^1.0.0-rc.1.0.0",
"aurelia-fetch-client": "^1.0.0-rc.1.0.0",
"aurelia-i18n": "^1.0.0-rc.1.0.0",
"aurelia-validation": "^0.10.0",
"aurelia-validatejs": "^0.6.0",
"bluebird": "^3.4.1"
},
smanaton
@smanaton
add a module declaration for validate-binding-behavior pointing to the amd folder
i cant find the exact declaration but i've seen it posted in this room a few times
add the following to aurelia.json
  {
    "name": "aurelia-validation",
    "path": "../node_modules/aurelia-validation/dist/amd",
    "main": "aurelia-validation"
  },
  {
    "name": "aurelia-validatejs",
    "path": "../node_modules/aurelia-validatejs/dist/amd",
    "main": "aurelia-validatejs"
  },
  {
    "name": "validate.js",
    "path": "../node_modules/validate.js/",
    "main": "validate"
  },
Tom Newby
@tomtomau
has anyone put together any interesting documentation around a file heirarchy they've found to be particularly effective in a large aurelia application?
Søren Müller
@SorenMuller
@smanaton @alsoicode Thx a million guys...
Just out of curiosity.. Shouldn't it be able resolve those files by it self.??
smanaton
@smanaton
@SorenMuller i'm sure it will do but the cli is still alpha
Søren Müller
@SorenMuller
@smanaton Ahh. ok.. Thx alot :-)
Tom Newby
@tomtomau
Biggest pain points we've had at the moment are, we have lots of view models and lots of components. Some components are generic and we've started to make some of registered as globalResources to simplify things. Some components are potentially generic across a few areas of the application. What should we do with services for components? I like the idea of having them in my services/ directory somewhere, but also like the idea of having it alongside the component which makes them more decomposable, replaceable pieces, hopefully
Mikael Porttila
@MikaelPorttila
question: how do I .if() in the new aurelia-validation framework?
Frédéric van der Essen
@cb-fred
@SorenMuller I'd like to know that as well, having to register all node modules individually seems like a huge regression from existing build systems
Mikael Porttila
@MikaelPorttila
the old validation supported:
.ensure('model.patientCity')
.if(() => this.model.someBoolean)
.hasMaxLength(20).withMessage('Max 20 tecken')
.endIf()
Søren Müller
@SorenMuller
@cb-fred Yup.. Used to jspm with its oddsand ends.... But tearing my hair out with npm :-|
Mikael Porttila
@MikaelPorttila
found it! data-ignored attribute
Frédéric van der Essen
@cb-fred
@SorenMuller this is not normal, tools like browserify can figure all that automatically
robinchesterman
@robinchesterman
I'm just browsing around a first project created with the Aurelia CLI - what is it using for bundling? Doesn't look like Webpack...
Søren Müller
@SorenMuller
This message was deleted
Frédéric van der Essen
@cb-fred
does anybody knows how to load npm submodules with aurelia cli ?
Søren Müller
@SorenMuller
@smanaton Hi, Im kinda baffled by the lines
´´´
{
"name": "validate.js",
"path": "../node_modules/validate.js/",
"main": "validate"
},
Validate.js is not directly under node_modules, but without theses lines, it cant find validate.js ?!?
Can you explain why ??
robinchesterman
@robinchesterman
blob
blob
I'm getting the above errors when trying to run / build a TypeScript app with the Aurelia CLI
Faesel Saeed
@faesel
does anyone know whats the best way of of passing a MVC model property to an Aurelia APP?
Doug Kent
@dkent600
@faesel return from web service method as JSON. MVC is very good at doing the JSON conversion for you.
Faesel Saeed
@faesel
thanks
Manca
@MancaZerovnikMekuc
Hi. Is there any nice example of how to use services in aurelia? In which file it is nice to do the configuration of fetch client?
Andrew Albright
@m-andrew-albright

Can I not add properties to my router's navigation items? This doesn't seem to work:

parent.js:

export class Parent {
  configureRouter(config, router) {
    config.map([
      {
        route: ['','child'],
        name: 'child',
        moduleId: './child',
        nav: true,
        title: 'Child',
        class: 'icon-ion-briefcase'
      },
    ]);
  }
}

parent.html (see <i class.bind="nav.class">):

<template>
  <div class="content-panel">
    <ul class="tabs">
      <li class="nav-item" repeat.for="nav of router.navigation">
        <a class="nav-link" href.bind="nav.href"><i class.bind="nav.class"></i>&nbsp;<span>${nav.title}</span></a>
      </li>
    </ul>
    <router-view containerless></router-view>
  </div>
</template>
lndnbrg
@lndnbrg
@robinchesterman I am getting the exact same errors, but it is working anyway. on github, there is a open issue about that.
Andrew Albright
@m-andrew-albright
For whatever reason, it acts like there is no .class property; so I assume there is some other way to do this?
srfabio
@srfabio
@m-andrew-albright you want to use the settings parameter for that
Andrew Albright
@m-andrew-albright
Ah, so settings.class then?
srfabio
@srfabio
settings: { class: something, other: somethingElse}
Andrew Albright
@m-andrew-albright
Thanks!
srfabio
@srfabio
@m-andrew-albright You're welcome!
Andrew Albright
@m-andrew-albright
:+1: that did it
smanaton
@smanaton

@faesel you can use

Object.assign(this, data);

where this is the viewmodel and data is your json model to save creating all the properties on your vm, you might already know this but i didnt and it saved me a bunch of work on large viewmodels

Ivan Zderadicka
@izderadicka
What is the best way to use router programatically to initiate navigation from JS - can it be passed via DI? How pass additional parameters to VM activate method?
smanaton
@smanaton
@SorenMuller sorry, no idea, i havent got around to using it yet
Faesel Saeed
@faesel
@smanaton thanks, i didnt know that either
Raimo Pitkänen
@rapitkan
Hi! How can I unit test private functions of ViewModel?
Josh McCullough
@JoshMcCullough

Hello everyone. Got a question...
When using <compose>, is there any way to provide a default view to render in the case that the dynamic view/model specified on the element does not exist? E.g....

<compose view="view-that-does-not-exist.html" view-model="vm-that does-exist.js"></compose>

Since the view does not exist, a 404 occurs while loading it. I want to catch this case (also for the VM), and swap out the view/VM with our custom "not found" view. Is it possible?

Ricky Blankenaufulland
@ZoolWay
What about wrapping it in a <div if.bind="isViewExisting">?
jeffgrann
@jeffgrann
To get the current route within a non-view-model class, would the best practice be to inject the Router and use this.Router.history.fragment? Or is this a no-no?
Josh McCullough
@JoshMcCullough
@ZoolWay How would I know how to set isViewExisting? I'd have to fetch the resource on my own to determine that. I was hoping to hook into the composition mechanism somehow instead.
Ricky Blankenaufulland
@ZoolWay
@JoshMcCullough If its like completly unknown before, yes, I cannot help with that at the moment. In my case I can check all possibilities in the viewmodel
Josh McCullough
@JoshMcCullough
Yeah, the view/VM in our case is user-specified so it could even have a typo in it, for instance. In those cases we're swapping it out with a "not found" view. Thanks.
Ricky Blankenaufulland
@ZoolWay
I understand. Sorry, no idea at the moment.
Dwayne Charrington
@Vheissu
@tomtomau The approach I take these days is:
src/

    common
        interfaces
        ...
        ...

    modules
        someFolderMatchingARoute
            module-file.ts
            module-file.html
            module-style.scss

    services

    styles
I also have a resources folder inside of src which is where I put my shared custom elements, attributes, value converters, etc.
I use a modules directory and each sub folder matches a route. So /dashboard/users would be: /src/modules/dashboard/users/index.ts, /dashboard/users/view/123 would be: /src/modules/dashboard/users/view.ts behind the scenes and so on.