You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
security: expose the safe value types. (50c9bed), closes #8568
security: fill in missing security contexts. (67ed2e2)
security: strip XSSI prefix from XHR responses. (df1b1f6)
security: support transform CSS functions for sanitization. (8b1b427), closes #8514
security: warn users when sanitizing in dev mode. (3e68b7e), closes #8522
shadow_css: add encapsulation support for CSS @supports at-rule (cb84cbf), closes #7944
ViewEncapsulation: default ViewEncapsulation to configurable (f93512b), closes #7883
BREAKING CHANGES
Location#platformStrategy property was previously accidentally exported as public
If any application requires access to the current location strategy, it should be accessed via DI instead
by injecting the LocationStrategy token.
The likelihood of anyone actually depending on this property is very low.
DirectiveNormalizer takes new constructor arguments, config:CompilerConfig.
Parser constructor required new parameter config: CompilerConfig as second argument.
Bundles are now in the bundles/ subdirectory within each package
HTML, style values, and URLs are now automatically sanitized. Values that do not match are escaped
or ignored. When binding a URL or style property that would get ignored, bind to a value
explicitly marked as safe instead by injection the DOM sanitization service:
class MyComponent {
constructor(sanitizer: DomSanitizationService) {
// ONLY DO THIS FOR VALUES YOU KNOW TO BE SAFE! NEVER ALLOW USER DATA IN THIS!
this.safeStyleValue = sanitizer.bypassSecurityTrustStyle('rotate(90deg)');
// then bind to `safeStyleValue` in your template.
}
}
PLATFORM_PIPES and PLATFORM_DIRECTIVES now are fields on CompilerConfig.
Instead of providing a binding to these tokens, provide a binding for CompilerConfig instead.
CompilerConfig used to take positional arguments and now takes named arguments.
Deprecation
Parse5DomAdapter will no longer be exported from @angular/platform-server as a public API as of RC.3.
A new function called serverBootstrap() will be provided, which will automatically set the correct
document during platform initialization.
Reverts
Revert fix(compiler): support string tokens with . inside. (cc86fee)
2.0.0-rc.1 (2016-05-03)
Known Issues
*** SECURITY WARNING ***
Contextual escaping is not yet implemented in Angular 2. This will be fixed in the upcoming RC.
In the meantime make sure to correctly escape all values that go into the DOM.
*** SECURITY WARNING ***
source maps for umd bundles are missing
Ruler service is not being reexported via @angular/platform-browser
To import various symbols please adjust the paths in the following way:
angular2/core -> @angular/core
angular2/compiler -> @angular/compiler
angular2/common -> @angular/common
angular2/platform/browser -> @angular/platform-browser (applications with precompiled templates) + @angular/platform-browser-dynamic (applications that compile templates on the fly)
perf: don’t use try/catch in 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
OTHER BREAKING CHANGES
ViewRef.changeDetectorRef was removed as using ChangeDetectorRefs
for EmbeddedViewRefs does not make sense. Use ComponentRef.changeDetectorRef
or inject ChangeDetectorRef instead.
Before, a EmbeddedViewRef used to have methods for
setting variables. Now, a user has to pass in a context
object that represents all variables when an EmbeddedViewRef
should be created.
ViewContainerRef.createEmbeddedViewRef now takes
a context object as 2nd argument.
EmbeddedViewRef.setLocal and getLocal have been removed.
Use EmbeddedViewRef.context to access the context.
DebugNode.locals has been removed. Use the new methods DebugElement.references
to get the references that are present on this element,
or DebugElement.context to get the context of the EmbeddedViewRef or the component to which the element belongs.
Depending on if you are using precompiled templates or you are compiling templates on the fly, the setup for the base test providers has changed:
Before:
// Somewhere in test setupimport{setBaseTestProviders}from'angular2/testing';import{TEST_BROWSER_PLATFORM_PROVIDERS,TEST_BROWSER_APPLICATION_PROVIDERS}from'angular2/platform/testing/browser';setBaseTestProviders(TEST_BROWSER_PLATFORM_PROVIDERS,TEST_BROWSER_APPLICATION_PROVIDERS);
After (applications that compile templates on the fly):
// Somewhere in the test setupimport{setBaseTestProviders}from'@angular/core/testing';import{TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS}from'@angular/platform-browser-dynamic/testing';setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
After (applications with precompiled templates):
// Somewhere in the test setupimport{setBaseTestProviders}from'@angular/core/testing';import{TEST_BROWSER_STATIC_PLATFORM_PROVIDERS,TEST_BROWSER_STATIC_APPLICATION_PROVIDERS}from'@angular/platform-browser/testing';setBaseTestProviders(TEST_BROWSER_STATIC_PLATFORM_PROVIDERS,TEST_BROWSER_STATIC_APPLICATION_PROVIDERS);
pipes now take a variable number of arguments, and not an array that contains all arguments.
inject can no longer wrap fakeAsync while fakeAsync can wrap inject. So the order in existing tests with inject and fakeAsync has to be switched as follows:
Before:
inject([...], fakeAsync((...) => {...}))
After:
fakeAsync(inject([...], (...) => {...}))
You will also need to add the dependency
'node_modules/zone.js/dist/fake-async-test.js'
as a served file in your Karma or other test configuration.
Injector was renamed into ReflectiveInjector,
as Injector is only an abstract class with one method on it
Injector.getOptional() was changed into Injector.get(token, notFoundValue)
to make implementing injectors simpler
ViewContainerRef.createComponent now takes an Injector
instead of ResolvedProviders. If a reflective injector
should be used, create one before calling this method.
(e.g. via ReflectiveInjector.resolveAndCreate(…).
DynamicComponentLoader.loadIntoLocation has been removed. Use @ViewChild(‘myVar’, {read: ViewContainerRef}) to get hold of a ViewContainerRef at an element with variable myVar. Then call DynamicComponentLoader.loadNextToLocation.
DynamicComponentLoader.loadNextToLocation now takes a ViewContainerRef instead of an ElementRef.
AppViewManager is renamed into ViewUtils and is a mere private utility service.
Compiler is renamed to ComponentResolver,
Compiler.compileInHost has been renamed to ComponentResolver.resolveComponent.
ComponentRef.dispose is renamed to ComponentRef.destroy
ViewContainerRef.createHostView is renamed to ViewContainerRef.createComponent
ComponentFixture_ has been removed, the class ComponentFixture
can now be created directly as it is no more using private APIs.
Location and other related providers have been moved out of router and into platform/common. BrowserPlatformLocation is not meant to be used directly however advanced configurations may use it via the following import change.
Before:
import {
PlatformLocation,
Location,
LocationStrategy,
HashLocationStrategy,
PathLocationStrategy,
APP_BASE_HREF}
from 'angular2/router';
import {BrowserPlatformLocation} from 'angular2/src/router/location/browser_platform_location';
After:
import {
PlatformLocation,
Location,
LocationStrategy,
HashLocationStrategy,
PathLocationStrategy,
APP_BASE_HREF}
from 'angular2/platform/common';
import {BrowserPlatformLocation} from 'angular2/src/platform/browser/location/browser_platform_location';
injectAsync is now deprecated. Instead, use the async function
to wrap any asynchronous tests.
You will also need to add the dependency
'node_modules/zone.js/dist/async-test.js'
as a served file in your Karma or other test configuration.
Before:
it('should wait for returned promises', injectAsync([FancyService], (service) => {
return service.getAsyncValue().then((value) => { expect(value).toEqual('async value'); });
}));
it('should wait for returned promises', injectAsync([], () => {
return somePromise.then(() => { expect(true).toEqual(true); });
}));
After:
it('should wait for returned promises', async(inject([FancyService], (service) => {
service.getAsyncValue().then((value) => { expect(value).toEqual('async value'); });
})));
// Note that if there is no injection, we no longer need `inject` OR `injectAsync`.
it('should wait for returned promises', async(() => {
somePromise.then(() => { expect(true).toEqual(true); });
}));
Renderer:
renderComponent method is removed form Renderer, only present on RootRenderer
Renderer.setDebugInfo is removed. Renderer.createElement / createText / createTemplateAnchor
now take the DebugInfo directly.
Query semantics:
Queries don't work with dynamically loaded components.
e.g. for router-outlet: loaded components can't be queries via @ViewQuery,
but router-outlet emits an event activate now that emits the activated component
Exception classes and the context inside changed (renamed fields)
DebugElement.attributes is an Object and not a Map in JS any more
ChangeDetectorGenConfig was renamed into CompilerConfig
AppViewManager.createEmbeddedViewInContainer / AppViewManager.createHostViewInContainer
are removed, use the methods in ViewContainerRef instead
Change detection order changed:
dirty check component inputs
dirty check content children
update render nodes
2.0.0-beta.15 (2016-04-13)
Bug Fixes
7837: MetadataCollector takes no parameters for the constructor. (c17dc1c), closes #7838
7987: Incremental build works with new trees (08b2956), closes #7989
build: ignore dart warnings The name … is shown, but not used (01e6b8c), closes #8045
router: Added method to get current instruction (6dce4f4)
transformers: change 'Missing Identifier' to be an error (45fd6f0), closes #7403
transformers: collect provider information (81beb1c)
BREAKING CHANGES
The recently added binding of the current router to the current component
has been renamed from router to $router.
So now the recommended set up for your bindings in your routed component
is:
{
...
bindings: {$router: '<'}}
2.0.0-beta.8 (2016-03-02)
Bug Fixes
angular1_router: rename $route service to $rootRouter (a1c3be2)
angular1_router: rename router component binding to $router (edad8e3)
angular1_router: support templateUrl components (d4a4d81)
change_detection: allow to destroy OnPush components inside of a host event. (280b86e)
change_detection: allow to destroy OnPush components inside of a host event. (ebd438f), closes #7192
core: support ngFor that has an ngIf as last node (1779caf), closes #6304#6878
i18n: added i18nPlural and i18nSelect pipes (59629a0), closes #7268
pipes: add ReplacePipe for string manipulation (6ef2121)
test: add withProviders for per test providers (c1a0af5), closes #5128
transformers: collect data needed for the template compiler (ebe531b), closes #7299
transformers: collect information for CompileDiDependencyMetadata (39b6e0e)
transformers: makes the map of resolved identifiers configurable (0bb10d6), closes #7359
BREAKING CHANGES
OnPushObserve was an experimental
feature for Dart and had
conceptual performance problems,
as setting up observables is slow.
Use OnPush instead.
In Dart we used to support injecting types with generics. As this feature is hard to implement with the upcoming codegen we are dropping it.
Merge cl/115454020 in G3 with this change.
The $router injectable service has been renamed to $rootRouter
The recently added binding of the current router to the current component
has been renamed from router to $router.
So now the recommended set up for your bindings in your routed component
is:
{
...
bindings: {$router: '<'}}
2.0.0-beta.7 (2016-02-18)
Bug Fixes
angular_1_router: Added DI string tokens (3478d5d), closes #4269#7031
typing: Remove re-export of the Promise built-in type. (265703b), closes #6468
(Note that if your file is not in the same directory as node_modules, you'll
need to add one or more ../ to the start of that path.)
If you have unit tests, you need to install typings in your project using
http://github.com/typings/typings
And install typings such as jasmine, angular-protractor, or selenium-webdriver
to satisfy the type-checker.
If you rely on es6 APIs other than Promises and Collections, you will need to
install the es6-shim typing instead of using the tag above.
Angular previously exposed typings for the entire ES6 API.
2.0.0-beta.5 (2016-02-10)
This release was incorrect; replaced with beta.6.
2.0.0-beta.4 (2016-02-10)
This release was incorrect; replaced with beta.6.
2.0.0-beta.3 (2016-02-03)
Bug Fixes
bundle: add angular2/platform/testing/browser to SystemJS testing bundle (ae7d2ab)
change_detection: allow all legal programs in the dev mode (42231f5)
dart/transform: Generate all code into .template.dart (8c36aa8)
debug: replace DebugElement with new Debug DOM (e1bf3d3)
ngFor: add custom trackBy function support (cee2318), closes #6779
upgrade: support bindToController with binding definitions (99e6500), closes #4784
WebWorker: Add Router Support for WebWorker Apps (8bea667), closes #3563
Performance Improvements
dart/transform: Only process deferred libs when necessary (f56df65), closes #6745
BREAKING CHANGES
This is a breaking change for unit tests. The API for the DebugElement
has changed. Now, there is a DebugElement or DebugNode for every node
in the DOM, not only nodes with an ElementRef. componentViewChildren is
removed, and childNodes is a list of ElementNodes corresponding to every
child in the DOM. query no longer takes a scope parameter, since
the entire rendered DOM is included in the childNodes.
// Depending on the DOM structure of your component, the
// index may have changed or the first component child
// may be a sub-child.
componentFixture.debugElement.children[0];
Before:
debugElement.query(By.css('div'), Scope.all());
After:
debugElement.query(By.css('div'));
Before:
componentFixture.debugElement.elementRef;
After:
componentFixture.elementRef;
2.0.0-beta.2 (2016-01-28)
Bug Fixes
bundles: testing bundle should include browser platform (4a41442), closes #6626
ChangeDetection: chain expressions evaluate to the last expression (codegen) (933a911), closes #4782#5892
core: always remove DOM listeners and stream subscriptions (0ae7775)
Dart: make some playground samples run with Dart Dev Compiler (3e65d14), closes #6441
dart/transform: Ensure template codegen is completed sync (5f0baaa), closes #6603
ddc: router, compiler, web worker fixes for DDC (db87bae), closes #6693
ddc: type fixes necessary to bring DDC severe count to 0 (4282297)
ddc: use dynamic types in reflection typedefs (c785a1e), closes #6437
directive: throw if output the same event more than once (8c37b7e)
dart/transform: DirectiveProcessor: do not process generated files (78bfdf7), closes #6517
dart/transform: Promote missing Directive warning to error (47a3b4d), closes #6519#6568
test: allow tests to specify the platform and application providers used (b0cebdb), closes #5351#5585#5975
testability: Expose function frameworkStabilizers (69ae363), closes #5485
BREAKING CHANGES
Renderer.listen now has to return a function that
removes the event listener.
TemplateRef.elementRef is now read-only.
Tests are now required to use setBaseTestProviders
to set up. Assuming your tests are run on a browser, setup would change
as follows.
Before:
// Somewhere in test setupimport{BrowserDomAdapter}from'angular2/src/platform/browser/browser_adapter';BrowserDomAdapter.makeCurrent
After:
// Somewhere in the test setupimport{setBaseTestProviders}from'angular2/testing';import{TEST_BROWSER_PLATFORM_PROVIDERS,TEST_BROWSER_APPLICATION_PROVIDERS}from'angular2/platform/testing/browser';setBaseTestProviders(TEST_BROWSER_PLATFORM_PROVIDERS,TEST_BROWSER_APPLICATION_PROVIDERS);
Previously, Angular would run in dev prod mode by default, and you could enable the dev mode by calling enableDevMode. Now, Angular runs in the dev mode by default, and you can enable the prod mode by calling enableProdMode.
2.0.0-alpha.54 (2015-12-15)
Bug Fixes
bundles: don't include RxJS in System.register bundles (77b7cae)
bundles: remove ngUpgrade from the angular2.js bundle (283962f), closes #5739#5854
bundles: remove polyfills from angular2.js bundle (2983558), closes #5881
bundles: rename the testing.js bundle to testing.dev.js (d55655f), closes #5899#5776
RxJS used to be bundled with Angular 2 code and this is not the case
any more. RxJS needs to be loaded explicitly.
Previously angular2.js, angular2.min.js and angular2.dev.js bundles
would have zone.js and reflect-metadata pre-appended. New bundles don't
contain zone.js nor reflect-metadata - those external dependencies can
be easily loaded into a browser using angular2-polyfills.js
ngUpgrade related symbols are no longer part of the angular2.js
bundle. ngUpgrade has a dedicated upgrade.js bundle now.
2.0.0-alpha.53 (2015-12-13)
Bug Fixes
angular2: don't export compiler bits as public API (20c6eeb), closes #5815#5797
renderer: use a comment instead of an element when stamping out template>` elements (194dc7d), closes #4805
BREAKING CHANGES
Observable are no more re-exported from angular2/core
Before
import {Observable} from 'angular2/core'
After
import {Observable} from 'rxjs/Observable';
The setupWebWorker function exported from
angular2/platform/worker_app no longer returns a promise of providers,
but instead synchronously returns providers.
Related to #5815
angular2/angular2 was removed. Use the correct import from one of the barrels. E.g. angular2/core, angular2/platform/browser, angular2/common, …
Note: This only applies to JavaScript, Dart is not changed.
The following symbols are not exported from angular2/angular2 any more:
UrlResolver, AppRootUrl, getUrlScheme, DEFAULT_PACKAGE_URL_PROVIDER.
Use imports from angular2/compiler instead.
router: set correct redirect/default URL from hashchange (aa85856), closes #5590#5683
Features
HtmlLexer: allow "<" in text tokens (aecf681), closes #5550
TemplateParser: allow template elements regardless the namespace (1f35048), closes #5703
BREAKING CHANGES
The existing sfx bundle (angular2.sfx.dev.js) is replaced by UMD bundles:
angular2.umd.js and angular2.umd.dev.js. The new UMD bundles dont have
polyfills (zone.js, reflect-metadata) pre-appended. Those polyfills
can be easily loaded by including the angular-polyfills.js bundle.
The external-dependencies.js bundle was removed.
Use angular-polyfills.js instead.
Number and content of UMD bundles have changed:
we only publish one bundle that contains: core, common, platform/browser, http, router, instrumentation and upgrade
exported names have changed and now:
core is exported as ng.core
common is exported as ng.common
platform/browser is exported as ng.platform.browser
http is exported as ng.http
router is exported as ng.router
instrumentation is exported as ng.instrumentation
upgrade is exported as ng.upgrade
Form directives are exportedAs 'ngForm' (was 'form')
Before:
html <form #f="form">
After:
html <form #f="ngForm">
rxjs, reflect-metadata, zone.js and es6-shims now must be specified as
explicit dependencies of each angular app that uses npm for package management.
To migrate, please add the following into the "dependencies" section of your package.json:
<whatever /> used to be expanded to <whatever></whatever>.
The parser now follows the HTML5 spec more closely.
Only void and foreign elements can be self closed.
End tags used to be tolerated for void elements with no content.
They are no more allowed so that we more closely follow the HTML5 spec.
Before
import * as ng from 'angular2';
After
import * as core from 'angular2/core';
Http's MockBackend is no longer exported from the angular2/http module. It's now available at angular2/http/testing
Operators and Observables from RxJS (e.g. .map(), .toArray(), .toPromise(), etc ) now need to be explicitly imported (once per operator in your app)
router: add support for APP_BASE_HREF to HashLocationStrategy (1bec4f6), closes #4935#5368#5451
router: allow linking to auxiliary routes (0b1ff2d), closes #4694
templates: introduce quoted expressions to support 3rd-party expression languages (b6ec238)
testing: use zones to avoid the need for injectAsync (0c9596a)
BREAKING CHANGES
Previously http would only error on network errors to match the fetch
specification. Now status codes less than 200 and greater than 299 will
cause Http's Observable to error.
A few private helpers (e.g., platformCommon or applicationCommon) were removed or replaced with other helpers. Look at PLATFORM_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS, BROWSER_PROVIDERS, BROWSER_APP_PROVIDERS to see if they export the providers you need.
Previously, components that would implement lifecycle interfaces would include methods
like "onChanges" or "afterViewInit." Given that components were at risk of using such
names without realizing that Angular would call the methods at different points of
the component lifecycle. This change adds an "ng" prefix to all lifecycle hook methods,
far reducing the risk of an accidental name collision.
To fix, just rename these methods:
onInit
onDestroy
doCheck
onChanges
afterContentInit
afterContentChecked
afterViewInit
afterViewChecked
Router Hooks
onActivate
onReuse
onDeactivate
canReuse
canDeactivate
To:
ngOnInit,
ngOnDestroy,
ngDoCheck,
ngOnChanges,
ngAfterContentInit,
ngAfterContentChecked,
ngAfterViewInit,
ngAfterViewChecked
Router Hooks
routerOnActivate
routerOnReuse
routerOnDeactivate
routerCanReuse
routerCanDeactivate
The names of lifecycle interfaces and enums have not changed, though interfaces
have been updated to reflect the new method names.
2.0.0-alpha.46 (2015-11-11)
Bug Fixes
core: Export dev mode API in Dart. (a3e6406), closes #5233
core: reexport PLATFORM_DIRECTIVES and PLATFORM_PIPES in dart (01ebff4)
core: various dart-specific fixes for core and facades (4a43230)
renderer: apply host element encapsulation also if the parent component is not encapsulate (344776f), closes #5240
forms: update FormBuilder to support async validations (1c322f1), closes #5020
forms: Use the DefaultValueAccessor for controls with an ng-default-control attribute. (f21e782), closes #5076
router: provide RouteConfig object for AuxRoute (0ebe283), closes #4319
Performance Improvements
dart/transform: Restrict visibility/mutability of codegen (45b33c5), closes #5009
BREAKING CHANGES
AMBIENT_DIRECTIVES -> PLATFORM_DIRECTIVES
AMBIENT_PIPES -> PLATFORM_PIPES
Previously, the controlsErrors getter of ControlGroup and ControlArray returned the errors of their direct children. This was confusing because the result did not include the errors of nested children (ControlGroup -> ControlGroup -> Control). Making controlsErrors to include such errors would require inventing some custom serialization format, which applications would have to understand.
Since controlsErrors was just a convenience method, and it was causing confusing, we are removing it. If you want to get the errors of the whole form serialized into a single object, you can manually traverse the form and accumulate the errors. This way you have more control over how the errors are serialized.
2.0.0-alpha.45 (2015-10-29)
Bug Fixes
benchmarks: update react and polymer benchmarks and get tree update numbers for all of the b (bc10dc3), closes #4709
benchpress: increase sampling frequency (127d6b6), closes #4985
ChangeDetector: support for NaN (1316c3e), closes #4853
router: add support for route links with no leading slash (07cdc2f), closes #4623
router: Make RootRouter disposable to allow cleanup of Location subscription. ROUTER_PRO (2e059dc), closes #4915
router: Support unsubscription from Location by returning the subscription. (2674eac)
validators: Add a pending state to AbstractControl (c9fba3f)
validators: Allow errors at both the group/array level or their children (28d88c5)
BREAKING CHANGES
ControlGroup.errors and ControlArray.errors have changed
Before: ControlGroup.errors and ControlArray.errors returned a reduced value of their children controls' errors.
After: ControlGroup.errors and ControlArray.errors return the errors of the group and array, and ControlGroup.controlsErrors and ControlArray.controlsErrors return the reduce value of their children controls' errors.
Errors format has changed from validators
Now errors from a control or an array's children are prefixed with 'controls' while errors from the object itself are left at the root level.
Example:
Given a Control group as follows:
var group = new ControlGroup({
login: new Control("", required),
password: new Control("", required),
passwordConfirm: new Control("", required)
});
Before: 1 + 1 | pipe:a | pipe:b was parsed as (1 + 1) | pipe:(a | pipe:b)
After: 1 + 1 | pipe:a | pipe:b is parsed as ((1 + 1) | pipe:a) | pipe:b
NgZone Moved to Stream/Observable-based callback API
deprecates these methods in NgZone: overrideOnTurnStart, overrideOnTurnDone, overrideOnEventDone, overrideOnErrorHandler
introduces new API in NgZone that may shadow other API used by existing applications.
Directives no longer match to variable names
You can no longer use a #foo or a var-foo to apply directive [foo], although it didn't work properly anyway.
This commit is fixing breakage caused by the switch to pre-compiler (exact SHA unknown).
Actions no longer support if statements
2.0.0-alpha.44 (2015-10-15)
Bug Fixes
compiler: attribute case in IE9 (b89c5bc), closes #4743
compiler: explicitly support event bindings also on <template> elements (cec8b58), closes #4712
publish: emit type declarations with CJS build (57649d1), closes #4706#4708
test: command compiler attr merge test in IE (e15e242)
Features
build: add tasks to watch and recompile js and dart (50e922f)
forms: add minlength and maxlength validators (e82a35d), closes #4705
BREAKING CHANGES
TypeScript typings are now included in the distribution. If you have installed external typings
(eg. using tsd to fetch files from DefinitelyTyped), you need to remove them. TypeScript will give
a Duplicate identifier error if the same type definition appears twice.
2.0.0-alpha.41 (2015-10-13)
Bug Fixes
compiler: merge class and style attributes from the element with the host attributes (eacc8e3), closes #4583#4680
compiler: shadow CSS @import test in some browsers (0def28e), closes #4629
ngFor: support a custom template (6207b1a), closes #4637
ngUpgrade: support for content project from ng1->ng2 (cd90e6e)
ngUpgrade: transclude content from ng2->ng1 (19c1bd7), closes #4640
BREAKING CHANGES
angular2/test_lib is now called angular2/testing
test_lib.js -> testing.js
import {...} from 'angular2/test_lib' -> import {...} from 'angular2/testing'
[()] desugaring changed:
Before:
<cmp [(prop)]="field"> was desugared to <cmp [prop]="field" (prop)="field=$event">
After:
<cmp [(prop)]="field"> is desugared to <cmp [prop]="field" (prop-change)="field=$event">
API DEPRECATION
"DI Binding" terminology has changed to "DI Providers" to avoid conflicts/confusion with data-binding. All commonly used apis that use "bind" or "binding" in the name still work but are deprecated and will be removed in future alpha releases. Please update your code:
Previously, router.navigate took a string representing the URL.
Now, it accepts an array that mirrors the link DSL.
The old navigate method has been renamed to router.navigateByUrl.
Either change your navigation calls to use the DSL (preferred) or
call router.navigateByUrl instead.
Before:
router.navigate
After:
router.navigateUrl
Pipes
add support for pure pipes
By default, pipes are pure. This means that an instance of a pipe will be reused and the pipe will be called only when its arguments change.
Before:
@Pipe({name: 'date'}) class DatePipe {} defines an impure pipe.
After:
@Pipe({name: 'date'}) class DatePipe {} defines a pure pipe.
@Pipe({name: 'date', pure: false}) class DatePipe {} defines an impure pipe.
Before:
@Pipe({name: 'date'}) class DatePipe {} defines an impure pipe.
After:
@Pipe({name: 'date'}) class DatePipe {} defines a pure pipe.
@Pipe({name: 'date', pure: false}) class DatePipe {} defines an impure pipe.
ViewQuery no longer supports the descendants flag. It queries the whole
component view by default.
Instead of working with finer grained element injectors, queries now
iterate through the views as static units of modification of the
application structure. Views already contain element injectors in the
correct depth-first preorder.
This allows us to remove children linked lists on element injectors and a
lot of book keeping that is already present at the view level.
Queries are recalculated using the afterContentChecked and
afterViewChecked hooks, only during init and after a view container has
changed.
add support for multi bindings
Previously a content binding of a component was visible to the directives in its view with the host constraint.
This is not the case any more. To access that binding, remove the constraint.
With a new compilerNgNonBindable
is not a directive but rather a special attribute (ng-non-bindable) recognized by the compiler. This means that you
can't import / use the NgNonBindable as a directive. You should remove all the imports for the the NgNonBindable
directive and all the references to it in the directives section of the @View decorator.
2.0.0-alpha.37 (2015-09-09)
Bug Fixes
build: delete unreferenced typings on npm install (42e1b07), closes #1636#3940
bundle: don't include System.config in dev bundle (a94f051), closes #3826#3862
ComponentUrlMapper: support relative template URLs in Dartium (7c7888d), closes #2771#3743
router: add back() support to MockLocationStrategy (60f38ea)
testability: Expose function getAllAngularTestabilities (7b94bbf)
transformers: add more information to factory debug reflection (be79942)
Performance Improvements
change_detection: do not check intermediate results (c1ee943)
change_detection: do not generate onAllChangesDone when not needed (adc2739)
change_detection: removed the currentProto property (71ea199)
BREAKING CHANGES
Directives that previously injected Pipes to get iterableDiff or keyvalueDiff, now should inject IterableDiffers and KeyValueDiffers.
Previously, if an element had a property, Angular would update that property even if there was a directive placed on the same element with the same property. Now, the directive would have to explicitly update the native elmement by either using hostProperties or the renderer.
router: use querystring params for top-level routes (fdffcaba, closes #3017)
testability: hook zone into whenstable api with async support (a8b75c3d)
transformers: directive aliases in Dart transformers (fix #1747) (fd46b49e)
url_resolver: support package: urls () (408618b8, closes #2991)
Breaking Changes
View renderer used to take normalized CSS class names (ex. fooBar for foo-bar).
With this change a rendered implementation gets a calss name as specified in a
template, without any transformations / normalization. This change only affects
custom view renderers that should be updated accordingly.
url_resolver: support package: urls (fixes #2991) (408618b), closes #2991
Reverts
style(ngFor): add whitespace to Directive annotation (74b311a)
BREAKING CHANGES
View renderer used to take normalized CSS class names (ex. fooBar for foo-bar).
With this change a rendered implementation gets a calss name as specified in a
template, without any transformations / normalization. This change only affects
custom view renderers that should be updated accordingly.
S:
Dart applications and TypeScript applications meant to transpile to Dart must now
import package:angular2/bootstrap.dart instead of package:angular2/angular2.dart
in their bootstrap code. package:angular2/angular2.dart no longer export the
bootstrap function. The transformer rewrites imports of bootstrap.dart and calls
to bootstrap to bootstrap_static.dart and bootstrapStatic respectively.
2.0.0-alpha.32 (2015-07-21)
Bug Fixes
api_docs: slightly more accurate description of Dart overrideOnEventDone (a4915ad)
api_docs: slightly more accurate description of TS overrideOnEventDone (fe3a559)
dom: Only send values for existing properties to js interior (153660f), closes #3149
BREAKING CHANGES
Pipes.append has been renamed into Pipes.extend.
Pipes.extend prepends pipe factories instead of appending them.
S:
shadow dom emulation no longer
supports the <content> tag. Use the new <ng-content> instead
(works with all shadow dom strategies).
removed DomRenderer.setViewRootNodes and AppViewManager.getComponentView
-> use DomRenderer.getNativeElementSync(elementRef) and change shadow dom directly
the Renderer interface has changed:
createView now also has to support sub views
the notion of a container has been removed. Instead, the renderer has
to implement methods to attach views next to elements or other views.
a RenderView now contains multiple RenderFragments. Fragments
are used to move DOM nodes around.
Internal changes / design changes:
Introduce notion of view fragments on render side
DomProtoViews and DomViews on render side are merged,
AppProtoViews are not merged, AppViews are partially merged
(they share arrays with the other merged AppViews but we keep
individual AppView instances for now).
DomProtoViews always have a <template> element as root
needed for storing subviews
we have less chunks of DOM to clone now
remove fake ElementBinder / Bound element for root text bindings
and model them explicitly. This removes a lot of special cases we had!
AppView shares data with nested component views
some methods in AppViewManager (create, hydrate, dehydrate) are iterative now
now possible as we have all child AppViews / ElementRefs already in an array!
host actions don't take an expression as value any more but only a method name,
and assumes to get an array via the EventEmitter with the method arguments.
Renderer.setElementProperty does not take style./... prefixes any more.
Use the new methods Renderer.setElementAttribute, ... instead
Part of #2476
compiler will throw on binding to non-existing properties.
Till now it was possible to have a binding to a non-existing property,
ex.: <div [foo]="exp">. From now on this is compilation error - any
property binding needs to have at least one associated property:
eaither on an HTML element or on any directive associated with a
given element (directives' properites need to be declared using the
properties field in the @Directive / @Component annotation).
Compiler.compile has been removed, the only way to compile
components dynamically is via Compiler.compileInHost
DynamicComponentLoader.loadIntoExistingLocation has changed:
renamed into loadIntoLocation
will always create the host element as well
requires an element with a variable inside of the host component view
next to which it will load new component.
DynamicComponentLoader.loadNextToExistingLocation was renamed into
DynamicComponentLoader.loadNextToLocation
DynamicComponentLoader.loadIntoNewLocation is removed
use DynamicComponentLoader.loadNextToLocation instead
and then move the view nodes
manually around via DomRenderer.getRootNodes()
AppViewManager.{create,destroy}Free{Host,Embedded}View was removed
use AppViewManager.createViewInContainer and then move the view nodes
manually around via DomRenderer.getRootNodes()
Renderer.detachFreeView was removed. Use DomRenderer.getRootNodes()
to get the root nodes of a view and detach them manually.
2.0.0-alpha.27 (2015-06-17)
Bug Fixes
Compiler: fix text nodes after content tags (d599fd3), closes #2095
DirectiveMetadata: add support for events, changeDetection (b4e82b8)