We've been working hard on Aurelia and this release brings a number of bug fixes, improvements and new features. There are a few breaking changes, but those are relatively minor and easy to fix. Read on for the details...
- You can now access all the parent router parameters directly through the
paramsobject in the activate callback. As a result, the
paramsof the activate callback now contains all parent route parameters, the current route parameters and all query string values.The parent params are no longer available via the $parent property. Parent params can be accessed via navigationInstruction.parentInstruction.params in the odd case where this is needed. The injected *childRoute param is no longer available on the params object either.
refbindings now work differently. Rather than
ref.*, the pattern is now
*.refwhich improves consistency and makes the
refbinding work like all the rest of Aurelia's binding commands. Here are the available options:
attribute-name.ref="someIdentifier"- create a reference to a custom attribute's class instance.
element-name.ref="someIdentifier"- create a reference to a custom element's class instance
ref="someIdentifier"- create a reference to the HTMLElement in the DOM
- If you are manually bootstrapping Aurelia (usually because you are installing custom plugins) but you are not using the
standardConfigurationhelper method, then you may need to add some additional configuration. In order to make Aurelia more flexible, we split out the history configuration from the router configuration so that different implementations of history can be used. So, if you are using the router but not the
standardConfigurationhelper you need to specify to use the history plugin or else it won’t be properly installed. To do that, just add
- Deeper integration with the module loader allows us to determine the module id of any export, thus enabling better convention-based composition of UIs.
- The Dependency Injection system can now auto-register non-functions and provides better errors when instantiation fails.
- The HttpClient now supports interceptors on all requests (Thanks @mordred !!!) and automatically adds the application/json content type when serializing content to json.
- Support for view bundles has been added to the loader. The next version of the CLI will support not only bundling JS but also bundling HTML.
- Enable multiple class bindings on the same element, which don't interfere with one another.
- Enable two-way binding to scrollTop and scrollLeft
- Enable ref bindings to work with all API properties for behaviors; both custom elements and custom attributes
- Enable custom observer location through getters and setters
- Massively expanded support for databinding to SVG
- Containerless custom elements
- Template part replacement in custom elements allows a custom element to specify certain parts of its view which can be replaced with alternate markup at runtime on a per-instance basis.
- New animation methods and events
- Default binding modes for custom attributes
- SyncChildren now works on view-models that are dynamically composed via the
- Support compiling templates from strings
focuscustom attribute (Nice work @manuel-guilbault !!!) Read more about how it was built here .
- History now properly handles scheme-relative URLs and properly normalizes all history url fragments.
- The EventAggregator catches errors thrown by subscribers, preventing a misbehaving subscriber from killing event propagation.
- Route generation no longer encodes $ in query strings, thus enabling certain special parameter naming schemes used by various APIs
- Correct type conversion behavior in boolean binding expressions
- Fix memory leak in array observation
- Fix swapped trigger and delegate events.
- Fix Object.observe memory leak
- Polyfill ClassList for IE
- Query string no longer causes errors in child routers, Child routers with redirects now work properly, and lots more router fixes
- Template anchors use comments to no longer affect CSS selectors.
- Various cross-browser fixes
- Fixed some async resource loading issues
- Fix binding to rowspan and colspan
- Correct destructuring syntax parsing in repeat.for
- Various fixes to the
- Framework now properly exports the path module
- Improved error messages during startup failure
I recommend using
jspm install for each "top level" Aurelia library. Just look in your package.json file, in the jspm section and be sure to re-install all the Aurelia dependencies listed there.
We are moving quickly towards our Beta. Here's what we are working on now:
- CLI - In the next week you will see a new release of our CLI along with an accompanying blog post detailing how you can bundle both your JS and HTML for application deploy. The CLI we are working on is going to be amazing, featuring the same sorts of patterns and extensibility model as Aurelia itself. This initial release focuses primarily on our core infrastructure and bundling.
- Documentation - We're currently designing a new documentation experience that we're pretty excited about. The new docs are a major goal of the Beta and we're starting major work on them now. Just like Aurelia and the CLI are being designed for extensibility and customization, so are the docs.
- Performance - We've now begun serious work improving performance and reducing memory utilization and GC pressure. Today's release has a few improvements in this area, related to memory leaks. We've also helped track down a major performance issue in the ES6 system.register module format which affects all major transpilers: Babel, Tracuer and TypeScript. We've begun work on our benchmarking suite and will be using that to measure Aurelia as we put it through a number of implementation transforms designed to make it lightning fast. You'll be hearing more about that as we progress.
Thanks for joining us on this adventure and being part of our community! We treasure you and look forward to sharing even more cool stuff we've got planned. If you haven't starred us on GitHub yet, please do! We'd also love for you to sign up for our newsletter . Newsletter subscribers will get the first opportunity to participate in some of our upcoming online events. You won't want to miss out!