Angular 2.0.0-rc.0 – First release candidate
Huge milestone today from Angular2 team. First release candidate announced a couple of hours ago via twitter. This probably means that things move faster that we think in development process. Many new Router features included and the way we install Angular2 via npm changed a little bit. Have a look below for the change log.
This is the first release candidate that contains repackaging of Angular into individual packages one per each feature area.
All of the packages are now distributed under the @angular npm scope. This changes how Angular is installed via npm and how you import the code.
To install Angular for a browser application please use:
12 npm install --save @angular/core @angular/compiler @angular/common @angular/platform-browser @angular/platform-browser-dynamic email@example.com firstname.lastname@example.org
To import various symbols please adjust the paths in the following way:
@angular/platform-browser(applications with precompiled templates) +
@angular/platform-browser-dynamic(applications that compile templates on the fly)
@angular/router-deprecated(snapshot of the component router from beta.17 for backwards compatibility)
- new package:
@angular/router– component router with several breaking changes
- core: introduce template context (cacdead), closes #8321
- core: support the decorator data that tsickle produces (b6fd811)
- di: support map literals as providers (46cd868)
- offline compiler: a replacement for tsc that compiles templates (78946fe)
- offline compiler: add metadata emit (072446a)
- router: add CanDeactivate (deba804)
- router: add link that support only absolute urls (fa5bfe4)
- router: add Router and RouterOutlet to support aux routes (6e1fed4)
- router: add RouterLink (de56dd5)
- router: add RouterUrlSerializer (79830f1)
- router: add RouteTree and UrlTree as aliases to Tree and Tree (277b1fc)
- router: add support for wildcards (8836219)
- router: adds an example app using the new router (602641d)
- router: change location when navigating (560cc14)
- router: implement relative navigation (e5b87e5)
- router: implements support for router-link-active (ec4ca0e)
- router: listen to location changes (62a0809), closes #8362
- router: set router-link-active when RouterLink is active (4fe0f1f), closes #8376
- router: update recognize to handle matrix parameters (446657b)
- router: update recognize to support aux routes (d35c109)
- router: update url parser to handle aux routes (fad3b64)
- testing: Use NgZone in TestComponentBuilder. (769835e), closes #8301
- tests: add ROUTER_FAKE_PROVIDERS to angular2/alt_router/router_testing_providers (0f1b370)
- metadata: Preserve Provider expressions (7c0d497)
- codegen: event handler has boolean return type (ca40ef5)
- compiler: fix cross view references and providers with
useValue. (f114d6c), closes #8366
- compiler: project using the right directive as component. (0f774df), closes #8344
- compiler: support css stylesheets in offline compiler (00d3b60)
- compiler: support empty array and map literals. (11955f9), closes #8336
- compiler_cli: make sure the generated code gets compiled via tic (163d80a)
- core: check components if an event handler inside of an embedded view fires. (4d691b6), closes #8242
- core: return the ChangeDetectorRef of the component also for embedded views. (351f24e)
- metadata: expose Providers in metadata (8bf6ef6)
- perf: don’t use
try/catchin production mode (b1a9e44), closes #8338
- router: canDeactivate should not change the url when returns false (76d6f5f), closes #8360
- router: create a route tree when creating the router service (ca13f1c), closes #8365
- typescript: strip abstract keyword from properties in .d.ts (a84c2d7), closes #8339
- ViewRef.changeDetectorRef was removed as using ChangeDetectorRefs for EmbeddedViewRefs does not make sense. Use ComponentRef.changeDetectorRef or inject ChangeDetectorRef instead.
- Before, a
EmbeddedViewRefused to have methods for setting variables. Now, a user has to pass in a context object that represents all variables when an
EmbeddedViewRefshould be created.
ViewContainerRef.createEmbeddedViewRefnow takes a context object as 2nd argument.
getLocalhave been removed. Use
EmbeddedViewRef.contextto access the context.
DebugNode.localshas been removed. Use the new methods
DebugElement.referencesto get the references that are present on this element, or
DebugElement.contextto get the context of the
EmbeddedViewRefor the component to which the element belongs.