aurelia

Visual Studio 2017 Javascript How to set 'experimentaldecorators'

霸气de小男生 提交于 2020-01-04 02:45:14
问题 Anyone knows how to get rid of this message when using Aurelia.js in VS2017?? I'm using VS2017, not VSCode, and I'm using Javascript, not Typescript as every internet article seems to believe... I tried unchecking the "Enable the new JavaScript language service" option, but it didn't help (and I also would like to keep using the new JS language service!). I also tried setting the EsLint option to false, but that didn't help either! Any suggestions? 回答1: You need a tsconfig.json with the

Aurelia: Easy way to create nested/multi level navigation menu

戏子无情 提交于 2020-01-03 19:07:08
问题 I need to create a multilevel navigation menu. The contents of the menu vary depending on the user. I plan on pulling the collection of navigation items that can contain an array of child items via a service that will return the data as JSON. Every example of navigation/routing I've seen uses static routes or single level menus. I have read a bit about child routing but that does not seem to be what I need. The only thing I can think of is to create a custom navigation element who's model

Aureliajs Waiting For Data on App Constructor

三世轮回 提交于 2020-01-03 13:43:48
问题 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 the version of each server side (web api) app and then, for the further requests, call the right api address including its version. So, in the app.js I am requesting the system meta and storing it somewhere. But some components get initialized before this request gets done. So they won't find the

debug Aurelia ViewModel similar to ko.toJson

天大地大妈咪最大 提交于 2020-01-03 07:21:33
问题 in knockoutjs you can output the ViewModel in a nice json format for debugging <pre data-bind="text: ko.toJSON($data, null, 2)"></pre> if there is a way to accomplish the same in Aurelia 回答1: You could create a custom element. Here's an example: https://gist.run?id=9eea8902521f4523ee2c app.html <template> <require from="./debug"></require> <input value.bind="firstName"> <input value.bind="lastName"> <debug></debug> </template> app.js export class App { firstName = 'Donald'; lastName = 'Draper

DevExtreme and Aurelia integration

岁酱吖の 提交于 2020-01-02 06:13:59
问题 DevExtreme support angular directives as shown on this example page for dxDataGrid. How can I achieve the same with Aurelia? Examples showing the integration: https://www.youtube.com/watch?v=iIZj6hOFg0o http://blog.falafel.com/getting-started-with-devexpress-and-angularjs/ 回答1: DevExtreme does not support integration with Aurelia out-of-the-box. But you can try to create the Custom Elements for some DevExtreme widget. 回答2: You may want to check out the work of Stefan Heim. He's created some

Aurelia.js: How do I animate an element when bound value changes?

99封情书 提交于 2020-01-02 03:29:14
问题 I am using Aurelia.js for my UI. Let's say I have the following view markup: <tr repeat.for="item in items"> <td>${item.name}</td> <td>${item.value}</td> </tr> Which is bound to a model "items". When one of the values in the model changes, I want to animate the cell where the changed value is displayed. How can I accomplish this? 回答1: This can be done with Aurelia custom attributes feature. Create a new javascript file to describe the attribute (I called the attribute "animateonchange"):

Using jQuery with Aurelia

别等时光非礼了梦想. 提交于 2020-01-02 02:53:08
问题 I have an Aurelia app and in app.js I want to use jQuery. So my config.js looks like: System.config({ ... map: { ... "jquery": "npm:jquery@2.2.0", ... } } And in app.js I import the jQuery like this: var $ = require('jquery'); But when I require it, I get the blank site. Same it was with import: import $ from 'jquery'; What is wrong? Thanks EDIT: ok, solved. The problem is, the jQuery code must be called inside the attached() mehtod. So like this: export class Class1 { attached() { //jQuery

Aurelia CLI app-bundle automatic update gets slow

不打扰是莪最后的温柔 提交于 2020-01-01 11:42:10
问题 Hi I have a web application runnig on the Aurelia CLI. From what I’ve read in the documentation, the Aurelia CLI runs always “bundled” and never targeting directly source files. By running the “au run –watch” command, Aurelia “listens” to file changes and recreates the app-bundle.js automatically. Sample output from console: Starting 'readProjectConfiguration'... Finished 'readProjectConfiguration' Starting 'processMarkup'... Starting 'processCSS'... Starting 'configureEnvironment'...

Aurelia CLI app-bundle automatic update gets slow

谁说我不能喝 提交于 2020-01-01 11:41:15
问题 Hi I have a web application runnig on the Aurelia CLI. From what I’ve read in the documentation, the Aurelia CLI runs always “bundled” and never targeting directly source files. By running the “au run –watch” command, Aurelia “listens” to file changes and recreates the app-bundle.js automatically. Sample output from console: Starting 'readProjectConfiguration'... Finished 'readProjectConfiguration' Starting 'processMarkup'... Starting 'processCSS'... Starting 'configureEnvironment'...

Aurelia CLI app-bundle automatic update gets slow

吃可爱长大的小学妹 提交于 2020-01-01 11:41:10
问题 Hi I have a web application runnig on the Aurelia CLI. From what I’ve read in the documentation, the Aurelia CLI runs always “bundled” and never targeting directly source files. By running the “au run –watch” command, Aurelia “listens” to file changes and recreates the app-bundle.js automatically. Sample output from console: Starting 'readProjectConfiguration'... Finished 'readProjectConfiguration' Starting 'processMarkup'... Starting 'processCSS'... Starting 'configureEnvironment'...