Today, we've got a major set of release for Aurelia, fixing many issues and adding new and more powerful features to the lineup.
We've updated many of Aurelia's libraries to newer versions. As part of this series of updates, we've made several breaking changes. The details follow this post, but here is a brief summary for those who need to update their code:
- The Loader now maintains a registry of loaded views along with knowledge of their dependencies. Views no longer use the
<import>element for importing view behaviors and other resources. You must now use the
<require>element. This change was made in order to enable future support for IE9.
- The Default Loader now uses system.js and require.js based loader plugins to load views. This ensures that all views will have their paths resolved by the module system. This fixes many scenarios, including views loaded from external plugins. There is no more
baseViewUrlsetting and if you used
baseUrlthis should also be removed. Instead, in your config.js map the "*" path to "dist/*.js".
- We removed the
selected-itembehavior and replaced it with a new more powerful and more consistent mechanism for binding to select elements with
- Enabled two-way binding of contenteditable elements
- Templating now has a simplified and improved resource loading pipeline with everything going through the native loaders. Global resources are no longer order dependent and plugins can be organized in any way.
- You can now specify views for a component more easily by simply re-exporting them via the view plugin. You can also do this by exporting a ViewStrategy.
- Bind styles with interpolation by using the new
- Binding to innerHTML and innerText is now supported. You can use the new
sanitizeHtmlvalue converter along with this.
aurelia.withResources()api has been replace with
aurelia.globalizeResources()which now accepts a module id. You can also rename global resources with the new
aurelia-mainattribute has been removed from bootstrapping. There is now only one attribute
aurelia-app. If no value is provided the framework will use the default configuration and load your app.js/app.html files as your root. If a value is provided, this is assumed to point to a configuration module that exports a
configurefunction. This function should configure the aurelia object and start the framework.
- New apis have been added by the bootstrapper for simplified configuration including
- The HttpClient API has had a major overhaul. Please see the docs and/or unit tests for how to use the new API.
If you want to update to all the new bits, the easiest way would be to re-run
jspm install for each top level aurelia library (the libraries listed in the jspm section of your package.json file). This is needed because of the non compatible version change due to breaking changes in several libraries. If you are unsure how some of these changes play out, you can have a look at the skeleton-navigation repo which has been updated based on this release. You can also look at our new skeleton-plugin repo to see how to write pluggable libraries for aurelia.
This release contained some breaking changes. The next couple of releases will also. We are attempting to get this all out of the way ASAP. The next set of changes will involve unifying ES7 Decorators and our metadata as well as simplifying behaviors. After that, we've got some more work to do on the router and possibly http.
The Aurelia team is working very hard and things are progressing well. We've got new plugins for animation and validation on the way soon, with demos coming. Our bundling solution is about 50% complete and work on the CLI is progressing as part of that. We've also got our benchmarking infrastructure almost ready and we will begin serious performance optimization soon.
- all: enable error aggregation with new AggregateError (88073ddb)
Dependency Injection 0.5.0
- container: factories are explicit (667a16e4, closes #13)
- singleton: always register in the root container (186b573e, closes #22)
- path: Join protocol independent paths (34655ae4)
HTTP Client 0.6.0
- http-client: rename withJsonpParameter to asJsonp (c70eedd8)
- http-client: improve API for creating new requests (93a6e38a, closes #27)
- request-builder: allow message parameters to be fully specified without sending the message (06d84947, closes #29)
- all: properly export the TemplateRegistryEntry (4c60c8f7)
- all: new template registry and global loader (99ec5e2e)
- view imports are now done with
- view imports are now done with
- view imports are now done with
Loader Default 0.5.0
- all: new loader-plugin-based template loader (ab694b12)
- EventManager: enable two-way binding of contenteditable elements
- ObserverLocator: support value binding select elements
- SelectValueObserver: Safari and Internet Explorer
- SelectValueObserver: internet explorer fix
- value-converter: update to plug into new resource pipeline (4e8c99d9)
- navigation-command: add explicit interface for commands interested in child routers (1e1c4d3b)
- router: do not interpret as child router if not configured (18e52d85, closes #34)
- animator: remove unused code from interface (986267f6)
- behavior: not all attached/detached were cascaded (31702e14, closes #35)
- property: correct if/else branch for dynamic notifications (9f79cbb0)
- view: first and last child should not be undefined (43c076c5)
- animator: add mechanism for default animator configuration (eb792bb1)
- view-engine: merge in and simplify resource coordinator (a836fde9)
- view-strategy: enable exported view strategy and registry to be used for view models (03790f85, closes #13)
Templating Binding 0.9.0
- BindingLanguage: warn on interpolation in style attribute
- SyntaxInterpreter: enable two-way binding of contenteditable elements
Templating Resources 0.9.1
- SanitizeHtmlValueConverter: switched html sanitization to converter
- all: update plugin to use new global resource api (09d41036)
- compose: activate not called on string vm's after initial compose (62c19215, closes #15)
- index: plugin now uses new id-base api for resources (f2cf8bf7)
- sanitize-html: use explicit metadata (8aa3a130)
- selected-item: remove selected-item behavior (ef130a76)
Templating Router 0.10.0
- all: update to new resource loading processing pipeline (122f7e9d)
- index: plugin now uses new id-base api for resources (79bb1906)
- all: load resources by module id only (655192b2)
- aurelia: add parameter default to setRoot (f3955d22)
- bootstrapper: change how default loader is discovered (13b04160)
- bootstrapper: new startup logic (373bf740)