aurelia - CustomAttribute looking for html -
i trying build custom attribute in aurelia based on customattribute
convention. however, when trying use in view, using <import from='./shared/tr'></import>
,aurelia tries tr.html
in same path.
exactly missing here?
edit: tr.js
looks below:
import aur = require("aurelia-framework"); export class trcustomattribute { public element; static inject = [element]; constructor(element) { this.element = element; } bind() { console.log(this.element); } valuechanged(newvalue) { if (newvalue) { console.log(newvalue); } console.log(this.element); } }
and trying use attribute below:
<import from='./shared/tr'></import> <button class="btn btn-primary" tr="something"> </button>
i believe you're looking <require from='./shared/tr'></require>
rather import. made same mistake few times , still miss :)
Comments
Post a Comment