aurelia

Using materializecss with aurelia

ⅰ亾dé卋堺 提交于 2020-01-11 03:48:06
问题 I would like to ask if there's a step by step way to use or configure materializecss with Aurelia. I'm currently able to run my Aurelia app up to the point in the tutorials where my index.html looks like this: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <link href="jspm_packages/github/dogfalo/materialize@0.97.0/dist/css/materialize.css" rel="stylesheet" /> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <title></title> </head> <body aurelia

Aurelia Semantic dropdown

邮差的信 提交于 2020-01-11 02:08:13
问题 I am trying to use a combo box in Aurelia so that my users can type in a drop down and search the contents. I was trying to incorporate the one that Semantic had created, but when I call dropdown on the element it doesn't run the code, so it stays a normal dropdown. Like the state example here http://semantic-ui.com/modules/dropdown.html What's the best way to go about doing this, has anyone done this yet, or can think of a good way to implement this functionality? 回答1: First of all, install

Dropzone implementation in Aurelia not working in Component

拥有回忆 提交于 2020-01-07 02:19:06
问题 I am trying to add dropzone to an Aurelia project. I followed the example of Jeremy Danyow. It all works fine when I'm setting up the project like his example project. But I don't want to put everything into the main.js and main.html . So I tried to encapsulate the dropzone functionality into a reusable component and adding this component to the main.html view. main.html <template> <require from="dropzone/dropzone.min.css"></require> <require from="./components/dropzone"></require> <dropzone>

Nested routing in aurelia js

半腔热情 提交于 2020-01-06 19:31:31
问题 Is there any way to have nested routing/child router in Aurelia JS as we have in ui-router for angular js? so that we can achieve following Update the partial view (only update a selected portion on the given event). having parent child relationship in the components TIA 回答1: Yes, it does. Multiple View Ports http://aurelia.io/hub.html#/doc/article/aurelia/router/latest/router-configuration/9 You can define two or more different views to be affected by a route, by creating more than one

Aurelia router - navbar with dropdowns

。_饼干妹妹 提交于 2020-01-06 02:46:03
问题 Let's say we have bootstrap 3 navbar, and part of the template could look like this: <ul class="nav navbar-nav"> <li repeat.for="row of router.navigation" class="${row.isActive ? 'active' : ''}"> <a data-toggle="collapse" data-target="#skeleton-navigation-navbar-collapse.in" href.bind="row.href">${row.title}</a> </li> </ul> This is also example from Aurelia docs. Now let's say, I'd like to add one item with dropdown: <ul class="nav navbar-nav"> <li repeat.for="row of router.navigation" class=

Adding 3rd-party JavaScript library (dropzone.js) to Aurelia

江枫思渺然 提交于 2020-01-05 07:18:32
问题 I'm having a lot of trouble figuring out how to add a 3rd-party JavaScript library to Aurelia (in this case dropzone.js). I've installed dropzone via npm and configured it in aurelia.json: { "name": "dropzone", "path": "../node_modules/dropzone/dist/min", "main": "dropzone.min", "resources": [ "dropzone.min.css" ] } And added the require statement for the CSS to my app.html: <require from="dropzone/dropzone.min.css"></require> However, when I try to do a simple test like just putting the HTML

composing html file in aurelia

一曲冷凌霜 提交于 2020-01-05 07:03:13
问题 I'd like to achieve something similar as "include" in android but in aurelia: How to inject a plain html file content into my view, with binding evaluated within the parent View, and without using a custom element? Binding innerhtml is not enough as, according to the doc, the bindings expressions are bypassed. 回答1: As already said by Ashley, using <compose view="./your-view.html"></compose> element will work with an existing HTML file and it will inherit the parent context. If you want to

composing html file in aurelia

拜拜、爱过 提交于 2020-01-05 07:00:30
问题 I'd like to achieve something similar as "include" in android but in aurelia: How to inject a plain html file content into my view, with binding evaluated within the parent View, and without using a custom element? Binding innerhtml is not enough as, according to the doc, the bindings expressions are bypassed. 回答1: As already said by Ashley, using <compose view="./your-view.html"></compose> element will work with an existing HTML file and it will inherit the parent context. If you want to

Test the addition of a route via ConfigureRouter. How do we see the NavModel?

旧巷老猫 提交于 2020-01-05 05:01:17
问题 In the following test, the router.navigation property has a length of zero. How do we access our routes NavModel ? import { Container } from "aurelia-framework"; import { RouterConfiguration, Router } from "aurelia-router"; describe("the RouterConfiguration", function () { let container: Container = new Container(); let routerConfiguration: RouterConfiguration = container.get(RouterConfiguration); let router: Router = container.get(Router); it("adds a route with a NavModel", function (done) {

How to resolve Aurelia binding-behavior error after upgrade to 1.1.3

混江龙づ霸主 提交于 2020-01-05 03:56:08
问题 I updated a few libraries including Aurelia-Validation to 1.1.3. After the update, I am getting this error: Expression 'invite.firstName&validate:validation' is not compatible with the validate binding-behavior Anywhere I use the validate binding behavior, this error is thrown. If I remove &validate then the error is not thrown. I don't see the issue. Have tried: Deleting all node_modules and running npm install/npm update "dependencies": { "aurelia-after-attached-plugin": "github:aurelia-ui