aurelia

Aurelia server side views: Adding auth header to http download request of view/viewmodel

China☆狼群 提交于 2019-12-25 14:45:13
问题 I'm using the sample Aurelia skeleton project (skeleton-esnext-aspnetcore), with a C#/MVC backend from: https://github.com/aurelia/skeleton-navigation/tree/master/skeleton-esnext-aspnetcore To support server side views, I updated the view locator prototype (ViewLocator.prototype.convertOriginToViewUrl) in main.js to request the view/viewmodel files from the server. Details here: http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/app-configuration-and-startup/9 This works fine,

Aurelia CLI font-awesome

蓝咒 提交于 2019-12-25 09:32:49
问题 I've tried several different solutions but not a single one have worked for me. I'm using.NET Core, latest Aurelia/Aurelia CLI and Font-Awesome installed using npm install font-awesome --save. Solution 1: New file: prepare-font-awesome.js in folder \aurelia_project\tasks import gulp from 'gulp'; import merge from 'merge-stream'; import changedInPlace from 'gulp-changed-in-place'; import project from '../aurelia.json'; export default function prepareFontAwesome() { const source = 'node_modules

Is it possible to use Angular2 or Aurelia with IIS and without having node.js and NPM installed?

放肆的年华 提交于 2019-12-25 09:13:26
问题 The reason why I ask if either Angular2 or Aurelia can be used without having node.js and NPM installed is because we can only deploy to windows IIS servers at work. We cannot have Node.Js or NPM installed on the servers, but I'd like to leverage the productivity of either A-framework, but it looks from pluralsight courses and suchlike that I need to have Node and NPM installed. Ideally I'd like to develop my Aurelia or Angular 2 app using TypeScript in Visual Studio. Is this possible without

Check all option on Aurelia, can this be improved

拟墨画扇 提交于 2019-12-25 07:53:13
问题 Right now we have the following code which fills kind of "dirty" with the power of aurelia bindings: HTML <input class="order-input-root" type="checkbox" click.delegate="checkAll()" /> Javascript checkAll(){ if($("input:checkbox.order-input-root").is(":checked")) { $("input:checkbox.order-input").removeAttr("checked"); $("input:checkbox.order-input").click(); return true; }else { $("input:checkbox.order-input").removeAttr("checked"); return true; } } Is there any way to improve this, is there

Aurelia - accessing updated class properties from injection?

不羁岁月 提交于 2019-12-25 07:48:01
问题 I'm still trying to find an answer to Aurelia JS - Making a synchronous HTTP request, to change data before page load? - so I tried the following in the code example for that question, https://gist.run/?id=90d98563621fe49c1dde6b4f2fc6961d . As per Aurelia - how to change bound variables, so the GUI changes?, I am aware that I can change a class variable that is a source of a HTML binding, and the HTML/GUI should update. So I'm trying something similar in the gist above - specifically, I am

Aurelia, running webpack-dev-server --hot throws error on App Hot Update - 'Cannot read property 'status' of undefined'

余生颓废 提交于 2019-12-25 07:39:17
问题 I downloaded a fresh copy of the Aurelia Navigation Skeleton github repo . I execute the npm run server:dev:hot , which is mapped to cross-env NODE_ENV=development npm run webpack-dev-server -- --inline --progress --profile --watch --hot . The webpack-server starts fine, I see in the console [HMR] is waiting for WDS signal. Everything is fine until I make a change in in a js file to trigger HMR refresh. Then I see an error/warning in the console. I haven't modified anything in the code from

Aurelia bundler does not delete references to old versioned bundles

岁酱吖の 提交于 2019-12-25 04:55:33
问题 I am switching my SPA web app from Durandal to Aurelia and am now taking a look at the bundling process. I use gulp to bundle the app and I followed the instructions on this Aurelia documentation page and other resources on the web. It works but there are some unclear things to me. This is my gulpfile.js var gulp = require('gulp'), bundler = require('aurelia-bundler'), uglify = require('gulp-uglify'), htmlmin = require('gulp-htmlmin'), del = require('del'); var config = { force: true, baseURL

Aurelia 2 custom elements (already sharing a view via @) doing almost the same thing, how to refactor?

时光毁灭记忆、已成空白 提交于 2019-12-25 04:37:22
问题 Here is my problem: Aurelia app: a few custom elements (already sharing a view via @UseView) doing almost the same thing (specific func shoud be defined by every element itself), how to manage shared code (inkl @bindable)? How to refactor this: https://gist.run/?id=897298ab1dad92fadca77f64653cf32c 回答1: The "shared" code you refer to in your question is lifecycle-related stuff in your custom elements, which isn't really suited for sharing. You would need to do inheritance, and with custom

Aurelia array observation doesn't react on array[index] = newItem

我是研究僧i 提交于 2019-12-25 04:24:43
问题 I use surprised why my repeat.for binding doesn't react on array change. Then I found out Aurelia array observation doesn't react on array[index] = newItem. This is confirmed when I read the spec https://github.com/aurelia/binding/blob/master/test/array-observation.spec.js The array observation only reacts on methods pop/push/reverse/shift/sort/splice/unshift. Replacing the whole array works too. I can fix my issue with splice instead of using array[index] = newItem ; But I would like to know

Angular2.JS files with d.ts files WITHOUT npm Visual Studio 2015

倾然丶 夕夏残阳落幕 提交于 2019-12-25 04:24:39
问题 Does anyone know of a recent blog post or tutorial on which angular 2 .js files along with the appropriate d.ts files I need so I can just drop them into an existing VS solution without using NPM? I see that I can get the angular files here, but not sure which ones I need. According to the Angular docs, I need do nothing to get typings files for library packages that include d.ts files—as all Angular packages do., but again, when I look thru a sample Angular app, don't know which d.ts files I