Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 23 19:13
    hiaux0 edited #104
  • Aug 23 18:59
    eriklieben reopened #108
  • Aug 23 18:58
    eriklieben closed #108
  • Aug 23 18:57
    hiaux0 synchronize #104
  • Aug 23 15:47
    m-gallesio commented #182
  • Aug 23 04:12
    HamedFathi synchronize #1128
  • Aug 23 01:39
    EisenbergEffect closed #27
  • Aug 23 01:39

    EisenbergEffect on master

    feat: support relative path1 in… Merge pull request #35 from 3cp… (compare)

  • Aug 23 01:39
    EisenbergEffect closed #35
  • Aug 23 00:27
    3cp commented #35
  • Aug 23 00:25
    3cp synchronize #35
  • Aug 23 00:06
    3cp commented #1143
  • Aug 22 18:45

    EisenbergEffect on master

    doc(backers): new wook backer … (compare)

  • Aug 22 01:21
    3cp commented #108
  • Aug 21 23:36
    3cp commented #1143
  • Aug 21 23:05
    3cp commented #1143
  • Aug 21 22:43

    EisenbergEffect on master

    Verify autoinject on abstract c… Merge pull request #185 from Dr… (compare)

  • Aug 21 22:43
    EisenbergEffect closed #185
  • Aug 21 21:52
    DrSammyD commented #182
  • Aug 21 21:51
    DrSammyD opened #185
Michael Withagen
@michaelw85
ok so maybe renaming the script opens up a world of trouble what about redirecting on your CDN?
Jonathan Seligsohn
@JSeligsohn
at this point the easiest is just to append something like "admin" to [name], just unfortunate there isn't one place to redefine what 'name' is and for aurelia cli to respect that
Jonathan Seligsohn
@JSeligsohn
I created a bug here: aurelia/cli#1144
Kevon
@Kevon72832128_twitter
Hi everyone, I'm new to Aurelia and trying to go through the videos from EisenbergEffect posted on Aug 30, 2016. The sample files say to reference vendor-bundle.js, but my project is using webpack and generates chunks. How do I bring in the vendor javascript via the chunks. Normally, I'd just add a script tag and point it at the vendor-bundle.js, but that seems wrong to to for the chunked files. Any help would be appreciated, even a link to a "how to" would be great.
Michael Withagen
@michaelw85
@Kevon72832128_twitter you only have to install and import the lib where you need it. If it's a Aurelia plugin follow the instructions to register the plugin in the main.js/ts
Kevon
@Kevon72832128_twitter
ok, I think I see what is happening... Aurelia uses Import statements in the Main.ts to grab things it needs, then WebPack works magic to link them all in...
Kevon
@Kevon72832128_twitter
Are there any updated traning videos available anywhere? It seems that some critical things have changed since 2016
Michael Withagen
@michaelw85
@Kevon72832128_twitter yes webpack follows the imports and the config aplits based on node module names to make the vendor chunks. This is all webpack not Aurelia specific. For documentation I would follow the guides on the Aurelia website instead of following the vids
Kevon
@Kevon72832128_twitter
Thank you @michaelw85. I found one thing I was missing! This was added for me in a file I had not looked at. <script type="text/javascript" asp-src-include="~/dist/*.chunk.js" asp-append-version="true"></script>
Vaccano
@Vaccano
I am looking to add OIDC into my application. I have seen a few OIDC libraries for Aurelia, but I have not seen any that support PKCE. Does anyone know an Aurelia Library that supports PKCE?
Ischca
@Ischca
Hello,
Is there an alternative to jQuery.inview in Aurelia?
Michael Withagen
@michaelw85
@Ischca Aurelia I think you could accomplish this with the attached method in the Aurelia component lifecycle (https://aurelia.io/docs/fundamentals/cheat-sheet#creating-components):
The Component Lifecycle
Components have a well-defined lifecycle:

constructor() - The view-model's constructor is called first.
created(owningView: View, myView: View) - If the view-model implements the created callback it is invoked next. At this point in time, the view has also been created and both the view-model and the view are connected to their controller. The created callback will receive the instance of the "owningView". This is the view that the component is declared inside of. If the component itself has a view, this will be passed second.
bind(bindingContext: Object, overrideContext: Object) - Databinding is then activated on the view and view-model. If the view-model has a bind callback, it will be invoked at this time. The "binding context" to which the component is being bound will be passed first. An "override context" will be passed second. The override context contains information used to traverse the parent hierarchy and can also be used to add any contextual properties that the component wants to add. It should be noted that when the view-model has implemented the bind callback, the databinding framework will not invoke the changed handlers for the view-model's bindable properties until the "next" time those properties are updated. If you need to perform specific post-processing on your bindable properties, when implementing the bind callback, you should do so manually within the callback itself.
attached() - Next, the component is attached to the DOM (in document). If the view-model has an attached callback, it will be invoked at this time.
detached() - At some point in the future, the component may be removed from the DOM. If/When this happens, and if the view-model has a detached callback, this is when it will be invoked.
unbind() - After a component is detached, it's usually unbound. If your view-model has the unbind callback, it will be invoked during this process.
Josiah Haswell
@josiahhaswell
Man--I'm having a crazy problem with aurelia-bootstrap--it's just not loading anything
Josiah Haswell
@josiahhaswell
err. Aurelia-bootstrapper
Josiah Haswell
@josiahhaswell
Eh
Nm. Somehow some bundles got added to my JSPM config
Josiah Haswell
@josiahhaswell
I guess the bundles field in JSPM 0.17's jspm.config.js jacks up aurelia-bootstrapper?
Ah. So that's what the "inject" option does in bundle-config
whack
Josiah Haswell
@josiahhaswell
Bleh. I guess that works in jspm 0.16 but not 17
bigopon
@bigopon
@josiahhaswell what fun are you having there?
Josiah Haswell
@josiahhaswell
Idk. I'm learning that I don't fully understand bundling. All of those things I said before were wrong
I mean, mostly it's working now
Now the only thing that's not working in this configure function is the setRoot, and it's just dying silently

export async function configure(application : Aurelia) {
  console.log("Got one");
  application.use
             .plugin('aire')
             .developmentLogging('debug')
             .standardConfiguration();
  console.log("Got 2");
  await application.start();
  console.log("Got 3");
  await application.setRoot('docs/application');
  console.log("Got 4");
}
bigopon
@bigopon
@josiahhaswell it should be working fine, from the look of the above block
if it dies silently, then it's must be something hidding the debug message
devJ0n
@devJ0n
import { ViewEngineHooks, View } from 'aurelia-framework';
// import { viewEngineHooks } from 'aurelia-binding';
import { MediaType } from './mediaType.ts';

// By convention, Aurelia will look for any classes of the form 
// {name}ViewEngineHooks and load them as a ViewEngineHooks resource. We can
// use the @viewEngineHooks decorator instead if we want to give the class a
// different name.
export class MediaTypeViewEngineHooks implements ViewEngineHooks {

  // The `beforeBind` method is called before the ViewModel is bound to
  // the view. We want to expose the enum to the binding context so that
  // when Aurelia binds the data it will find our MediaType enum.
  beforeBind(view: View) {

    // We add the enum to the override context. This will expose the enum
    // to the view without interfering with any properties on the
    // bindingContext itself.
    view.overrideContext['MediaType'] = MediaType;

    // Since TypeScript enums are not iterable, we need to do a bit of extra
    // legwork if we plan on iterating over the enum keys.
    view.overrideContext['MediaTypes'] = 
      Object.keys(MediaType)
        .filter((key) => typeof MediaType[key] === 'number');
  }
}
How do I solve this Typescript compile error? on row " view.overrideContext['MediaType'] = MediaType;"
Element implicitly has an 'any' type because expression of type '"MediaType"' can't be used to index type 'Object'.
  Property 'MediaType' does not exist on type 'Object'.ts(7053)
Michael Withagen
@michaelw85
@devJ0n Looking at the error I would think view.overrideContext['MediaType'] does not exist
Josiah Haswell
@josiahhaswell
@bigopon Yeah--I just don't really know. Everything works fine without injecting the bundles, but then things aren't bundled correctly.
It's open-source if you want to take a look
Josiah Haswell
@josiahhaswell
Bleh. Maybe I'm swimming upstream still using JSPM
Fernando Vega
@vegafx12
is aurelia SSR dead?
Michael Withagen
@michaelw85
ssr?
Fernando Vega
@vegafx12
server side rendering
Michael Withagen
@michaelw85
ah havent used it or looked into it yet so I have no clue
bigopon
@bigopon
@vegafx12 no its not
But it needs an owner, just like other parts of Aurelia
What issues are you running into btw?
MylesPenlington
@MylesPenlington
Has anybody seen any major performance issues with repeat.for and bindings on a <tr? I've had an issue where by if I use class-name.one-time="csspiece" it renders instantly (100 row grid), but it I use class.bind/class.one-time it takes 10 seconds of javascript execution (according to chrome performance tools) - using latest aurelia versions - it's the first time I've seen anything like this ... the html is below - any ideas (I'm okay using class-name in the meantime). I wonder if its a combination of bindings?
<tbody>
    <tr repeat.for="item of items" class.one-time="item.css">
        <td>${item.createdAt}&nbsp;</td>
        <td>
            <a href="#/cards/values/${item.id}">${item.questionCount}</a>&nbsp;
        </td>
        <td>
            <a href="#/analysis/results/${item.id}" >${item.firstname}&nbsp;${item.surname}</a>&nbsp;
        <td>
            <a href="Report/${item.id}" model.bind="item" target="_blank" title="Report" click.delegate="downloadReport($event)">${item.rA > ' ' ? item.rA : "___?"}</a>
        </td>
        <td>
            <template if.bind="item.isLinkSent">
                <a href="#/accounts/update/${item.id}">${item.linkSentAt}</a>&nbsp;
            </template>
        </td>
    </tr>
</tbody>
MylesPenlington
@MylesPenlington
I seems to have narrow the issue down to the combination of the string interpolation and the repeat/class. Either one by itself is ok, the combination is a performance failure. Ie this is bad, but if I remove ${item.rA > ' ' ? item.rA : "___?"} its okay. Any ideas anybody?
<tbody>
    <tr repeat.for="item of items" class.one-time="item.css">
        <td>
            <a href="Report/${item.id}" model.bind="item">${item.rA > ' ' ? item.rA : "___?"}</a>
        </td>
        <td>
            <template if.bind="item.isLinkSent">
                <a href="#/accounts/update/${item.id}">${item.linkSentAt}</a>&nbsp;
            </template>
        </td>
    </tr>
</tbody>
hiaux0
@hiaux0
@MylesPenlington I don't have a solution for you, but have you tried to use the Performance tab in the browser dev tools? There, you can at least find out what causes that perf issue
MylesPenlington
@MylesPenlington
Good point - I did use that, it was stuck in Major GC for 98% of the time - which was not that helpful unfortunately. (Chrome v76). Thankfully I've managed to work around it in the meantime.
bigopon
@bigopon
@MylesPenlington that's weird. that interpolation has very little to do with GC
can you try
<tbody>
    <tr repeat.for="item of items" class.one-time="item.css">
        <td>
            <a href="Report/${item.id}" model.bind="item" textcontent.bind="item.rA > ' ' ? item.rA : "___?"></a>
        </td>
        <td>
            <template if.bind="item.isLinkSent">
                <a href="#/accounts/update/${item.id}">${item.linkSentAt}</a>&nbsp;
            </template>
        </td>
    </tr>
</tbody>
Instead?
MylesPenlington
@MylesPenlington
Hmm, can't re-produce this morning. I also noticed that I was missing a </td> on the line above. All options are working as expected at the moment. Must have had some serious quantum entanglement juice in the computer last night! Thanks.
bigopon
@bigopon
i guess its' window upgrade
or something in the background