aurelia

Is there any integration for a textarea wysiwyg and Aurelia?

我们两清 提交于 2019-12-13 02:12:10
问题 I'm currently using Summernote It looks pretty much like this: Demo http://aurelia-tinymce-sample.sukobuto.com/ github https://github.com/sukobuto/aurelia-tinymce-sample But this works with nodejs so I can't really bind tons of textareas, I found this list of all the WYSIWYG with reviews on each but none seems to be fully integrated with aurelia https://github.com/iDoRecall/comparisons/blob/master/JavaScript-WYSIWYG-editors.md Any ideas or tips to avoid nodejs? 回答1: EDIT: This question Using

Aurelia auth - custom response message - console error

旧街凉风 提交于 2019-12-13 00:03:46
问题 Using this aurelia-auth plugin together with .NET Core webAPI, I wish to return a custom error when user tries to log in with incorrect username and/or password. WebAPI: public HttpResponseMessage Login() { if (passwordValid) { return Request.CreateResponse(new LoginResponseViewModel { Token = token }); } else { return Request.CreateResponse(HttpStatusCode.Unauthorized, "Incorrect username or password!"); } } Script logIn(email, password) { return this.auth.login(email, password) .then

Aurelia npm install: tons of “gyp ERR”

纵然是瞬间 提交于 2019-12-12 20:45:01
问题 These types of questions are a dime a dozen, and I've gone through resource after resource but nothing seems to work: https://github.com/nodejs/node-gyp/issues/629 NodeJS - Error installing with NPM http://blog.jimdhughes.com/2015/04/09/perils-with-node-gyp-and-windows-development/ Here's the deal, I'm pretty new to NodeJS and Aurelia, however my ancedotal experience is that with the advent of the recent front-end revolution and with all of its tooling, folks really made things look

How can I compose a VM into a view within an Aurelia validation renderer

核能气质少年 提交于 2019-12-12 20:16:35
问题 I'm trying to use the aurelia-validation plugin to perform validation on a form. I'm creating a custom validation renderer that will change the color of the input box as well as place an icon next to the box. When the icon is clicked or hovered, a popup message appears that will display the actual error message. Currently, I'm rendering all of this in code manually in the renderer, but it seems like it would be nice to have the html for all of this defined in an html file along with the

Aurelia CLI + Typescript: Cannot find module errors

試著忘記壹切 提交于 2019-12-12 19:38:16
问题 I am trying to set up a basic Aurelia project following the video tutorial on Aurelia Homepage here. I think I have followed the exact steps given in the video (just changed ES6 to Typescript). When I tried to run the app by executing au run --watch , it gave me this error: ReferenceError: define is not defined at Object.<anonymous> (/aurelia_project/tasks/build.js:1:63) Investigating further, when I opened aurelia_project directory, I found that all the .ts files are filled with cannot find

Aurelia HttpClient cancel requests

折月煮酒 提交于 2019-12-12 19:25:12
问题 I am trying to build an auto complete component and want to make it cancel unresolved requests to the server while they type. I can find no documentation around this in the documentation for HttpClient. It mentions it IS cancellable (unlike fetch) but not how. https://aurelia.io/docs/plugins/http-services Currently I have this which I cobbled together quite blindly, unsurprisingly it doesn't even abort the requests: async searchTermChanged(newValue, oldValue) { if (newValue.length < 3) return

Aurelia: validating form with reusable validatable custom element

荒凉一梦 提交于 2019-12-12 18:36:25
问题 Short question: How can I validate a parent form when the validation is part of child custom elements? Long version: I built a reusable custom element which includes validation which is working like I expect it to do: validated-input.html: <template> <div class="form-group" validate.bind="validation"> <label></label> <input type="text" value.bind="wert" class="form-control" /> </div> </template> validated-input.js: import { bindable, inject } from 'aurelia-framework'; import { Validation }

Reflect.getOwnMetadata is not a function in karma with latest Aurelia

血红的双手。 提交于 2019-12-12 18:30:47
问题 After updating to the latest version of Aurelia (March update beta.1.1.4), I'm getting the following error every time I run karma tests: Error: Reflect.getOwnMetadata is not a function Error loading C:/Software/myproject/test/unit/myclass.spec.ts How do I fix it? 回答1: This has to do with the change of Aurelia from core-js to home-grown polyfills. The Reflect polyfill is missing and tests fail to run. This problem is addressed in Aurelia navigation skeleton app by the following import

Aurelia Post with http-fetch-client producing an options request

爱⌒轻易说出口 提交于 2019-12-12 18:28:30
问题 I'm creating a small forum where people in our company can put up adverts for goods or services they want to sell on the fly, using aurelia. I have a list of adverts page working fine, a details page for each advert working fine both using get requests from an api. However i can't seem to get the work the Post reqeust when someone wants to add a comment on an advert. @inject(HttpClient) export class ApiData { constructor(httpClient) { httpClient.configure(config => { config .withBaseUrl(

Refreshing i18n translated string interpolated values in Aurelia

孤者浪人 提交于 2019-12-12 17:51:49
问题 If i eg. use a select drop down input field in my header (more precisely in my sitewide nav-bar which is custom element), and have that value set globally in a shared state object. If I - on languageChanged(value) (inside the nav-bar custom element) also change the this.i18n.setLocale('de-DE') How would I then refresh the i18n translated string interpolated values (eg. ${'status_deceased' | t} ) inside my templates without having to navigate to a new route and back as I do right now? I found