Questions tagged [aurelia]

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

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

Features

  • Forward-thinking
  • Modern Architecture
  • Two-Way Databinding
  • Extensible HTML
  • Routing & UI Composition
  • MV* with Conventions
  • Convention over Configuration
  • Broad Language Support
  • Testable

Community

Getting Started

Presentations

For the most up to date list refer to Awesome Aurelia (curated list of resources)

3402 questions
11
votes
1 answer

Image source binding in Aurelia

I am trying to bind the src attribute of an img tag in an aurelia component, how can I do so? I'm creating some images in a reapeat.for loop this way: In which, the…
Galiold
  • 113
  • 1
  • 7
11
votes
3 answers

How to set default activationStrategy in aurelia

Aurelia normally ignores any changes in the querystring. It is possible to set the activationStrategy to invoke-lifecycle in the VM so it will re-run the all the life cycles in the VM when the querystring changes. To prevent littering my code…
Vijay Bin
  • 113
  • 1
  • 6
11
votes
3 answers

How to call a function on uncheck and on check with Aurelia

I have a list of items coming in from an API and they won't always be the same, so the number of items in the array is always changing. I'm creating a checkbox for each item. The user has the ability to check/uncheck each item. Here's what I want…
Brandon
  • 3,074
  • 3
  • 27
  • 44
11
votes
1 answer

Script tag in Aurelia view is not executed

I'm adding a simple script block to a simple aurelia view: The script is never run, even though the view is rendered correctly and I can see that the…
Sam Shiles
  • 10,529
  • 9
  • 60
  • 72
11
votes
2 answers

Focus an element in Aurelia

I want to set focus to a form element. With jQuery this is so easy, just $('selector').focus. I have created a simple and in my .ts file I add a property and use it here: attached() { …
specimen
  • 1,735
  • 14
  • 23
11
votes
1 answer

How to set up a checkbox binding in Aurelia

I have a checkbox list, when the user checks one of the checkbox a function is called in the .js file and it in turn calls a method dataservice.js which calls a webapi controller, this all works fine and returns the correct data. What happens when…
DazedandConfused
  • 357
  • 5
  • 16
11
votes
2 answers

Aurelia: How to call a function outside custom element?

I have one custom element named custom-element and I put it inside template A (with controller A) export class CustomElem { @bindable onCompleted; ........ } And updateDescription() is one function of controller A. export class A { …
Chu Văn Nam
  • 121
  • 2
  • 5
11
votes
2 answers

Pass values to route

I have a list of items. When the user clicks on an item, the user will be taken to item details page. I want to pass an object containing item details(like item's image URL) to the route. However, I don't want to expose it in the routes url. If…
Sayem
  • 6,079
  • 4
  • 22
  • 26
11
votes
1 answer

How can I conditionally add or remove CSS classes in Aurelia repeat.for?

I have an array of stuff from which I am building a
MaYaN
  • 6,683
  • 12
  • 57
  • 109
11
votes
3 answers

Aurelia repeat.for limit

I'm developing an app with Aurelia and let's say I have a loop there:
${t.name}
There are many entries so naturally I would like to limit number of them shown. So basically I would like to have something like…
Alexander Mikhalchenko
  • 4,525
  • 3
  • 32
  • 56
11
votes
3 answers

debug Aurelia ViewModel similar to ko.toJson

in knockoutjs you can output the ViewModel in a nice json format for debugging


if there is a way to accomplish the same in Aurelia 
Nerdroid
  • 13,398
  • 5
  • 58
  • 69
11
votes
1 answer

Configure IIS server to work with Aurelia framework and push state

I have created a basic aurelia app starting from this repo and I was trying to get rid of the # (hashtag) in the URL bar. I have 2 projects, one running WebApi on a machine and one running an empty web project (not MVC) on another machine. On the…
11
votes
2 answers

How to get reference to the current router from ViewModel

In my viewmodel class, how do I get a reference to the current Router? What I really want to do is get the current ModuleId. In Durandal, there was system.getModuleId, but there is no system in Durandal, so I figure the router is going to have that…
Greg Gum
  • 33,478
  • 39
  • 162
  • 233
11
votes
2 answers

Protecting against CSRF attacks in Aurelia

In Aurelia, there doesn't seem to be any support for CSRF protection yet, as opposed to AngularJS's XSRF-TOKEN header which is set automatically on all XHR requests by the AngularJS framework. How should I go about protecting an Aurelia app from…
Svein Fidjestøl
  • 3,106
  • 2
  • 24
  • 40
11
votes
2 answers

Using a Decorator to get list of implemented interfaces

Do you know if it is possible to get the array of interfaces implemented by a class using a decorator: interface IWarrior { // ... } interface INinja { // ... } So If I do something like: @somedecorator class Ninja implements INinja, IWarrior…
Remo H. Jansen
  • 23,172
  • 11
  • 70
  • 93