aurelia

Aurelia not binding innerHTML bind statements

痞子三分冷 提交于 2020-06-28 05:48:08
问题 Given I have used innerhtml.bind to insert some html but that html includes within it it's own aurelia '.bind' statements how do you get those inner bindings to be recognized by aurelia? example <div innerhtml.bind="myhtml"></div> where var myhtml = "<div click.trigger='console.log(123)'>some text</div>"; 回答1: The docs say: Binding using the innerhtml attribute simply sets the element's innerHTML property. The markup does not pass through Aurelia's templating system. Binding expressions and

Error upgrading text plugin for Aurelia CLI 0.20.2 -> 0.23.0

流过昼夜 提交于 2020-03-06 04:24:12
问题 I'm trying to upgrade my aurelia.json file for changes from v0.20.2 to v0.23.0, within an ASP.NET Core project. I've installed the requirejs and text packages via npm install requirejs text --save , which are now external dependencies. All changes are working fine, except for the text plugin, when I replace the old version: { "name": "text", "path": "../wwwroot/scripts/text" } with the string "text" as per the changelog notes, I get this error from au build : 2> Starting

How to assign string | undefined to string in TypeScript?

≡放荡痞女 提交于 2020-02-21 10:57:06
问题 I want to assign a variable, which is string | undefined, to a string variable, as you see here: private selectedSerialForReplace(): string | undefined { return this.selectedSerials.pop(); } luminaireReplaceLuminaire(params: { "serial": string; "newserial": string; }, options?: any): FetchArgs { ............ } luminaireReplaceLuminaire({serial: this.selectedSerialForReplace(), newserial: response.output}); I get this error: Argument of type '{ serial: string | undefined; newserial: any; }' is

Custom attribute in aurelia no working?

本秂侑毒 提交于 2020-02-03 05:37:08
问题 I am learning how Aurelia works and I am trying to get a simple custom attribute working. All it will do is change the color of a div text depending on some value changing. I have a div which has: high.bind="changeColor" and in my attribute I have : import {inject, customAttribute} from 'aurelia-framework'; @customAttribute('high') @inject(Element) export class High { constructor(element) { this.element = element; } valueChanged(newValue){ console.log(newValue); if (newValue) { this.element

Facebook plugins not working on content/template pages

南楼画角 提交于 2020-02-02 13:23:45
问题 I am quite new to Facebook plugin programming. I am referring the quick start document. In my web site I have a layout page and few content pages. Only the layout page contains the full html-head-body structure and rest of the content pages contain partial html elements (those can be thought of as templates). I have put the FB.init() script only in layout page, just below the body tag: <script> window.fbAsyncInit = function () { FB.init({ appId: 'MY-APP-ID', xfbml: true, version: 'v2.3' }); }

Facebook plugins not working on content/template pages

一世执手 提交于 2020-02-02 13:23:09
问题 I am quite new to Facebook plugin programming. I am referring the quick start document. In my web site I have a layout page and few content pages. Only the layout page contains the full html-head-body structure and rest of the content pages contain partial html elements (those can be thought of as templates). I have put the FB.init() script only in layout page, just below the body tag: <script> window.fbAsyncInit = function () { FB.init({ appId: 'MY-APP-ID', xfbml: true, version: 'v2.3' }); }

Facebook plugins not working on content/template pages

一曲冷凌霜 提交于 2020-02-02 13:23:07
问题 I am quite new to Facebook plugin programming. I am referring the quick start document. In my web site I have a layout page and few content pages. Only the layout page contains the full html-head-body structure and rest of the content pages contain partial html elements (those can be thought of as templates). I have put the FB.init() script only in layout page, just below the body tag: <script> window.fbAsyncInit = function () { FB.init({ appId: 'MY-APP-ID', xfbml: true, version: 'v2.3' }); }

Aurelia router view animation with swap-order=“with”

让人想犯罪 __ 提交于 2020-02-01 04:18:14
问题 I am using aurelia-animator-css to animate router views. Upon navigation to a new router view, I want the current view to slide off screen to the left while the new view slides onto the screen from the right. Here is my router-view element: <router-view swap-order="with"></router-view> Here is the top element in each of the views: <div class="pages au-animate"> And here is the css: @keyframes slideLeftIn { 0% { transform: translate(100%, 0); } 100% { transform: translate(0, 0); } } @keyframes