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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -