Questions tagged [aurelia]

Aurelia is a next generation JavaScript client framework that leverages simple conventions to empower your creativity.

1
vote
2answers
17 views

How to fetch data from a JSON file in aurelia framework?

I'm trying to fetch data from external JSON file using aurelia-fetch-client but it gives 404 not found error. I have tried implementing the basic setup suggested by the official docs. Here is my ...
2
votes
0answers
13 views

.RTF files do not appear on Browser File Explorer

I have an input that accepts a list of mimetypes. The List is being passed from an array of mimetypes which is the following: allowedMimeTypes = [ "application/pdf", "image/jpeg", "image/...
3
votes
1answer
33 views

How can I refresh a child component in Aurelia to undo a form?

I have a component with two buttons, save and cancel. Inside this component there is a slot. And inside this slot, I put my form with some bindable fields. my-app.ts <section-component> <...
1
vote
2answers
36 views

Compare values when object not received (TypeScript, Aurelia)

I'm trying to compare defined role (in my app.ts) and revived role from WebServer. But when I'm not logged I have problem with compare values: This is what I'm doing: export class ...
1
vote
0answers
42 views

This is undefined within catch block [duplicate]

I'm trying to set the this.signinError within the catch block. however when the console.log(this.signinError); is called it keep returning undefined. When I do it before the function call, it returns ...
1
vote
1answer
36 views

Checking user role in settings repository (typescript, aurelia)

I'm doing some navigation with authorization. I did something like this run(navigationInstruction: NavigationInstruction, next: Next) : Promise<any> { let requiredRoles = ...
1
vote
1answer
25 views

Dependency Injection (for HttpFetch) at setRoot in main.js Aurelia

I am having trouble getting dependency injection working for my AuthorizerService. Obviously, dep-inj is not ready until after Aurelia "starts", but I wasn't sure how to access it. main.js: ...
1
vote
0answers
14 views

installing aurelia-mask for auerlia project

I followed the gui here to install the aurelia mask and to use it. But now when i load the page i keep getting Error: "Cannot find module './aurelia-mask/masked-input'.". I dont understand what am i ...
0
votes
1answer
29 views

How can a String.prototype be declared in Aurelia?

I am porting some plain JS code into Aurelia and I want to include String.prototype.xxxxx types, but I have not been successful. So, This: String.prototype.uncamelize = function() { ... }...
1
vote
1answer
36 views

Aurelia non html-only custom element notrendering

I have a simple custom elemen, but it is not rendering. If i do <require from="./myfooter.html"></require> then it renders only the html part. But if i do <require from="./myfooter">...
1
vote
1answer
42 views

How can I include hyperlinks in a column in ag-grid with aurelia?

I have this grid: <ag-grid-aurelia #agGrid class="ag-theme-balham" style="width: 100%; height: 350px;" grid-options.bind="filesThatAreMalwareOptions"> ...
1
vote
1answer
22 views

Aurelia bundle not found

I am set the project in my local mac, and i want to run it with "gulp watch", i do it before and its work fine for me but now when i do "gulp watch" and go to browser i got an error by browser. GET ...
1
vote
1answer
12 views

How to have a run time config file for aurelia app built with webpacks 4

I have a application built with aurelia and bundled with webpacks. I have a variables in a typescript file. When i do a producation build, I just want to change those variables when I deploy at ...
1
vote
1answer
41 views

How to load data in to rowData in ag-grid?

I have the following code in my html-class: <ag-grid-aurelia #agGrid class="ag-theme-balham" style="width: 100%; height: 350px;" #agGrid grid-ready.call="onGridReady()" ...
3
votes
1answer
48 views

How to clear the file input binding in aurelia?

Aurelia binding with file input works perfectly fine but when I use a clear function that simply resets the model property to empty array, the binding gets cleared but the browser file input keeps ...
1
vote
1answer
21 views

Aurelia child router does not go through main router pipeline

The main router's pipeline of my application redirects to login page if a user is not logged in. It works fine for most pages, but when said page holds itself a child router, the logic does not seem ...
1
vote
0answers
12 views

If object not found then show default image as alternative

I want to show a PDF to users on specific page .Therefore I used a OBJECT HTML tag for this purpose and its working fine .But if URL of PDF borken or changed then I am getting error that "PDF Is not ...
1
vote
0answers
18 views

Validate and show all error on page and remove errors on condition meet

I want to show all errors messages which i apply on Aurelia Validation .For example if user click on Password input box then all related error message should be highlight /show and hide/remove errors ...
4
votes
2answers
50 views

aureliajs conditional parent layout

I am writing my client app in aureliajs. And by default, for a route like this: /app/access/management my app gets rendered like this: For example assume that the header and sidebar gets rendered ...
1
vote
0answers
21 views

Aurelia store connectTo never sets target property

I set the aurelia-store up as per the docs; in the main.ts at the bottom of all the plugins (from the skeleton app with dotnet core) I have as the last plugin defined: aurelia.use....
1
vote
0answers
15 views

Validate password and give dynamic alert while Typing

I am using Aurelia Framework .I want that when user typing a password then Dynamic Alerts/console should show to user while typing . 1- Must Contain 1 Capital Alphabets. 2-Must Contain 1 small ...
1
vote
0answers
29 views

How do you create an autocomplete input in Aurelia?

I am new to Aurelia, and am wondering how you can create an autocomplete input. I am trying to autocomplete for a panel of colors, and once you type into the input, it will autocomplete to the colors (...
1
vote
1answer
47 views

Error using 'atob' command - Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded

I need to decode a base64 string into PDF file. Im using this code. But the window.atob command always report that error: Failed to execute 'atob' on 'Window': The string to be decoded is not ...
1
vote
0answers
21 views

Table with One Item on Each Row with a Few Properties in Aurelia via HTML Loop

I want to create a CSS grid with columns that have auto widths so that it fits the data in a way that makes the most sense automatically. My problem is that I don't know have the same automatic ...
3
votes
0answers
80 views

Aurelia plugin scoped CSS

I've built an Aurelia plugin and I'm using some styling there. My problem comes when I want to use this plugin in my existing Aurelia app. The styles are imported at the head so all my Aurelia ...
0
votes
1answer
88 views

Aurelia activate with signalR

How can I use signalR with aurelia canActivate() and activate() page cycle? What I mean is... In my VM constructor I initilaize the signalR connection. in canActivate() or activate() methods I start ...
1
vote
1answer
112 views

Locate an image and save in JSON type array in Aurelia on submission

I am working in Aurelia and I have to locate an image and save in JSON type array on submission. I am unfamiliar to handle images in array because array cannot handle images and we have to convert ...
0
votes
1answer
67 views

Browsers become unresponsive due to a long running script - How can I find the script responsible?

I'm currently facing a peculiar problem. In our QA environment we found that a specific entity is causing browsers to become unresponsive. It is a quite large Aurelia project so even if I have the ...
0
votes
0answers
23 views

Change.call is not working with bind-able property

I have one bind-able property which I have to use in drop-down to analyze which ID is selected. I am using change.call method to identify when user will select drop-down options then console will give ...
1
vote
0answers
53 views

Weird double question marks in the query string parameters with fetch api and laravel

Facing a very weird problem when posting query string params from browser(chrome) using fetch API and then parsing the params on server side with php-laravel, the parameter key is getting prepended ...
2
votes
1answer
28 views

using router.navigateToRoute() to navigate to child route

I have the following app structure: -app -route1 -route2 -child1 -child2 I would like to navigate to route2/child1 from route1. Using this.router.navigateToRoute(name of ...
3
votes
1answer
31 views

Dinamically load external css resources model side

I need to dynamically load external css resource to change font family of the page. In my SPA the user chooses the font family he prefers for the UI. So he copy/paste the font family from https://...
3
votes
1answer
72 views

Adding service workers in Aurelia

To make my aurelia app a proper PWA, that I have created using aurelia cli, I need to register a service worker. There is already a similar unanswered question or few discussions and forum posts on ...
2
votes
0answers
20 views

Variable binding in Aurelia results in no-undef ESLint error

When using Aurelia's @bindable decorator on a variable in a custom element, ESLint complains that the variable is not defined. import { bindable } from "aurelia-framework"; export class Logo { @...
1
vote
0answers
13 views

Detect when child component is rerendered

I have a link element injected into translation string that I later consume via aurelia-i18n plugin. I need to listen for a click event on this link. As far as I researched it is not possible to add ...
1
vote
1answer
20 views

How to apply i18n on console message under Aurelia

I am working under Aurelia Framework.I want to apply i18N on console messages . I am using two languages "English" and "French" Console.log("Hello World"); How i can print this message in french ...
1
vote
0answers
14 views

How can an Aurelia webpack app detect a new deploy so it does not lock up?

Aurelia distribution files (e.g. Login.05c4e689c938c0914a72.chunk.js). When you recompile, these filenames change so if a user has the app up in thier browser and a new deploy is made AND the program ...
5
votes
1answer
53 views

Aureliajs Waiting For Data on App Constructor

I am developing an app in aureliajs. The development process is started for many months and now, the back-end developers want to make their services versioned. So I have a web service to call to get ...
1
vote
4answers
63 views

Save data in array with auto Id increment

I have an array in the following format but on form submit, there is no "ID" field available. I want that when the form is submitted by the user then an auto-generated ID should be given and save in ...
2
votes
1answer
64 views

aurelia property observer not being disposed

Folks, I have a ViewModel which gets a singleton injected into its constructor. In the constructor I then create an observer on a property in the singleton instance. In the detached() function I ...
-2
votes
1answer
45 views

Find Max Id (Int Type) from JSON Array [duplicate]

I am working in Aurelia.I want to get highest(max) Id in Integer type from json array . private list :any; this.list = { "a_Rows": [ { "id": "1", "sname": "amir", ...
1
vote
1answer
71 views

Switching favicon dynamically in Aurelia preferably using binding

I have an Aurelia messaging app where I need to change the favicon dynamically when some new message is received. Something that you might have observed many apps are doing these days to let the user ...
1
vote
1answer
33 views

How to change locale in aurelia-froala-editor?

How to change language of froala-editor using aurelia? Where do I exactly need to add scripts of language files? Have already checked https://www.froala.com/wysiwyg-editor/languages but I cannot ...
1
vote
1answer
26 views

Aurelia send config/parameters on initialisation aurelia-app

Is there any way to send let's say config parameters when initializing an Aurelia app? <div aurelia-app="my-app/main"></div> This is what I do to start my aurelia app and then <...
1
vote
0answers
41 views

How to Include SASS via the require element in an Aurelia template

I'm trying to get an Aurelia project to include a .scss file with a <require> tag in an html file as opposed to via an import statement in a typescript file. I've looked at the relevant Webpack ...
1
vote
1answer
28 views

Aurelia CLI viewport does not render

I created a new aurelia project for typescript following the docs here https://aurelia.io/docs/tutorials/creating-a-contact-manager. The installed version of the CLI is aurelia-cli v1.0.0-beta.13. I ...
3
votes
2answers
93 views

How to move options from one select to another in aurelia?

I am trying to move selected options in select1 to select2 on the click of a button. This is my HTML code: <p> <select id="select1" size="10" style="width: 25%" multiple> <option ...
2
votes
1answer
46 views

Uploading images using aurelia to asp.net core backend

I have been searching for a solution for this but none of the guides are updated or suited for my intention. I need a user uploaded image to be loaded into javascript/aurelia which then sends it to ...
1
vote
0answers
22 views

configuring aurelia.json to load googleapis npm packages

I'm trying to configure aurelia.json in an aurelia typescript appliction to include googleapis npm package that it gets loaded by the loader, but during building/bundling with aurelia-cli I always get ...
2
votes
1answer
34 views

Composing a large'ish Aurelia app - multiple apps on one page

So I have a large application which is composed of features. Each feature is accessible via a menu which essentially loads a web page containing an aurelia app for that particular feature. This is ...