aurelia

Aurelia: Child Router Navigation: Route not found

点点圈 提交于 2019-12-12 03:15:14
问题 Below are my views: 1. app - standard 2. home - Has a list of items on left, on selection of any, will display some content on the right side in router-view (contract-view to be loaded). 3. contract-view app.ts: route Config: configureRouter(config: RouterConfiguration, router: Router) { config.title = 'Contracts Portal'; config.map([ { route: ['', 'home'], name: 'home', moduleId: 'home', nav: true, title: 'Home' }, { route: 'resources', name: 'resources', moduleId: 'resources', nav: true,

Accessing Custom Component Data/Methods

 ̄綄美尐妖づ 提交于 2019-12-12 03:13:55
问题 I have an html file that uses a custom component. The custom component reaches out and gets data on the bind() method. So, when the component gets bound, it gets the data and sets the properties accordingly. This component also has a Save() method that, when called, should submit the object to the database. Now, in my outer html file, I have imported this custom component. So I have the custom component and then I have a submit button (not a part of the custom component) like this: <custom

Time-Picker using jQuery in Aurelia

怎甘沉沦 提交于 2019-12-11 17:21:47
问题 I want to have a custom Time-Picker in Aurelia. A part of View you can see here: <template> <require from="time-picker"></require> . . <input timepicker id="time-setting" value.bind="currentTime"> And time-picker.ts is here: import { customAttribute, inject } from "aurelia-framework"; import $ from "jquery"; import "pickadate/lib/compressed/picker.time"; @customAttribute("timepicker") @inject(Element) export class TimePicker { private usePickADate: boolean; constructor(private element:

Aurelia - How to access a variable from my navmenu and be able to test whether its true or false

两盒软妹~` 提交于 2019-12-11 15:33:25
问题 Novice, I am trying to access a Boolean variable in my view-model. My view-model accesses a class with a function that returns a boolean value. In this case whether its logged in. What I want to do is use the if.bind to either show or hide a menu element. My navmenu is as follows: <template bindable="router"> <require from="./navmenu.css"></require> <div class="main-nav"> <div class="navbar navbar-inverse"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle=

Aurelia - Setting up basic authorization pipeline causes navigation links to disappear

泪湿孤枕 提交于 2019-12-11 14:47:51
问题 I wanted to implement an authorization step in my router and so I utilized the typescript example in the a Aurelia docs almost verbatum. My navbar now does not work and I dont know why? This is how I set up the router. import { Aurelia, PLATFORM } from 'aurelia-framework'; import { Redirect, NavigationInstruction, RouterConfiguration, Next } from 'aurelia-router'; export class App { configureRouter(config: RouterConfiguration): void { config.title = 'Aurelia'; config.addAuthorizeStep

Aurelia Validation validation error detected, but no error message

泪湿孤枕 提交于 2019-12-11 13:57:25
问题 I have a super simple code I'm trying to validate: <template> <form role="form" submit.delegate="submit()" validate.bind="validation"> <div class="form-group"> <label>Test Field</label> <input type="text" value.bind="testField" class="form-control" validate="Description" placeholder="What needs to be done?" /> <button type="submit">Submit</button> </div> </form> </template> With the following viewmodel define(["require", "exports", "../scripts/HttpClient", "aurelia-validation", "aurelia

How to make single div with contents to fill entire page when printed

江枫思渺然 提交于 2019-12-11 13:44:20
问题 I have an aurela app that needs to be able to print out labels. On the page with the form there is a hidden div that contains the layout of the label. I want to print only the hidden div and i want it to be stretched(with content) to be ful size of the page in landscape. Currently it only fills a small corner of the page. JSFiddle Label This is the CSS i have tryed to get it working. Weird thing is changes to the @page does nothing. I tryed different page sizes but nothing affects the div, it

Using the @bindable attribute on child class in Aurelia

时光毁灭记忆、已成空白 提交于 2019-12-11 09:59:27
问题 For the current project at work, we are creating quite a few custom controls that all share the same properties and that are bindable. @bindable required: boolean = false; @bindable minLength: number = 0; @bindable maxLength: number = 0; Since we'd like to avoid code duplication, the idea is to keep these bindable properties in a separate class, called 'Validation' in this case. import {Validation} from "./validation"; export class MyClass { private validation: Validation = new Validation();

aurelia-i18n with aurelia-cli gives error plugin.load is not a function

混江龙づ霸主 提交于 2019-12-11 09:46:24
问题 has anyone been able to successfully use aurelia-i18n with a project started using aurelia-cli written in TypeScript? I have tried a couple of projects following the instructions in the github project doco, but it comes up with an error in the browser when running it. vendor-bundle.js:4872 Uncaught TypeError: plugin.load is not a function at Module.<anonymous> (vendor-bundle.js:4872) at vendor-bundle.js:3911 at on (vendor-bundle.js:4294) at Module.callPlugin (vendor-bundle.js:4732) at Module

Aurelia JS - Kendo UI vertical sliders with height in percent?

别说谁变了你拦得住时间么 提交于 2019-12-11 09:29:51
问题 I've taken a version of the code posted on Aurelia JS - iterate through children (kendo UI) elements? and modified it slightly, here: https://gist.run/?id=323de53223d2ec872f17361378639556 I would basically like to express that the vertical sliders should be 90% of the height of the enclosing div ; note that: If there is no CSS height: specification, the sliders get some height, and that is it If I set the CSS height (either via div.eqSlider in basic-use.css , or as an inline style attribute)