Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use require and when to use import in Aurelia?

Tags:

aurelia

Into my second day of Aurelia and I have seen how custom attributes can be created and used.

To use the custom attribute my view html used:

<require from="./highlightattribute"></require>

However I have found some other code which uses:

<import from='./chord-diagram'></import>

When do I use require and when do I use import?

like image 695
JD. Avatar asked Apr 17 '15 14:04

JD.


1 Answers

<import from=... is the old syntax. We had to move to <require from... to aid in supporting older versions of IE. So please always use <require from....

like image 55
Ashley Grant Avatar answered Oct 22 '22 12:10

Ashley Grant