Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Fast and productive web framework provided by Dart

Subscribe to updates I use angular2

Statistics on angular2

Number of watchers on Github 562
Number of open issues 149
Average time to close an issue 5 days
Main language Dart
Average time to merge a PR about 17 hours
Open pull requests 24+
Closed pull requests 177+
Last commit over 1 year ago
Repo Created over 3 years ago
Repo Last Updated over 1 year ago
Size 7.76 MB
Homepage https://pub.dartl...
Organization / Authordart-lang
Latest Release5.0.0-alpha+7
Page Updated
Do you use angular2? Leave a review!
View open issues (149)
View angular2 activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating angular2 for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Pub Package Build Status Gitter

AngularDart is a productive web application framework that powers some of Google's most critical applications. It's built on Dart and used extensively by Google AdWords, AdSense, Fiber, and many more projects.

Built with AngularDart

New to AngularDart?

Ramp up quickly with our docs, codelabs, and examples:

You may also be interested in other codelabs and a set of community contributed tutorials.

Getting AngularDart

AngularDart is available as the angular package on pub.

For historical reasons, this package was once called angular2. We have since dropped the 2 and are now just angular. If you're looking for version 2.x or 3.x, see the angular2 package.


angular2 open issues Ask a question     (View All Issues)
  • almost 3 years Can't use routerLink w/o a explicit route config (even if routes are defined in the app component)
  • almost 3 years Template parser should be re-usable to create update/migration scripts
  • almost 3 years Error when importing a code with a top level method named 'init' to a component.
  • almost 3 years Dart2JS warnings when bind model with inheritance
  • almost 3 years Create e2e tests for common "error" cases and assert good messages
  • almost 3 years Grab some open source Angular widgets, create e2e tests for parsing
  • almost 3 years Use schemas when running the TemplateParser (right now everything "unknown")
  • almost 3 years Add an HTML5 schema for a few elements (div, span, button)
  • almost 3 years Parse expressions into an AST
  • almost 3 years [2.1] Angular supports Bazel and DDC
  • almost 3 years [2.1] Deprecate the reflective/dart:mirrors based APIs
  • almost 3 years [2.1] Improve change detection speed 2x
  • almost 3 years [2.1] Increase view initialization speed 2x
  • almost 3 years Unable to update *ngFor attribute used for ngControl
  • almost 3 years Implicit class name conflicts with 'dart:html'
  • almost 3 years Binding a class using an async pipe
  • almost 3 years Hot reloading in angular2
  • almost 3 years Support new named parameter default value syntax
  • almost 3 years Component encapsulation only works with predefined constants
  • almost 3 years Remove dart:mirrors dependency
  • almost 3 years Remove initReflector from show statement in browser_static.dart
  • almost 3 years Create good docs or example of how to implement dynamic component loading
  • almost 3 years How to use SASS with components?
  • almost 3 years Having `document` symbol defined brake template compilation
  • almost 3 years *ngSwitchWhen parsing bug in Dartium
  • almost 3 years Remove route from registry
  • almost 3 years Access the host component from a directive issue
  • almost 3 years Create a EBNF file describing the official grammar of the template syntax
  • about 3 years Debuggable code, i.e. generate sourcemaps
  • about 3 years Abstract classes with external methods fail if they are not declared in the main `web/index.dart` file
angular2 open pull requests (View All Pulls)
  • basic refactoring on lib/src/animate
  • Convert the lexer back to synchronous, add a simple parser
  • Initial implementation of pure source_gen based template compiler.
  • Translate ng_template_outlet.ts to dart
  • Added dart analyzer
  • API doc comment updates for lifecycle hooks and router
  • Fix change_detection codegen test
  • chore(*): Prepare to release.
  • chore(Travis): Try removing --low-resources-mode
  • Add markAsUntouched method to AbstractControl
  • Use travis deploy config
  • GitHub Sync
  • Fix SEO issues from Light House
  • Set expire time for js and svg at 1 day - 86400
  • chore(Runtime): Replace assertionsEnabled->isDevMode.
  • fix(Compiler): Hoist this.rootEl as local var _rootEl.
  • fix(Compiler): Fail on missing selector for queries.
  • fix(Compiler): Infer List<Element> for queries.
  • GitHub Sync
  • Add "pub run dev:deps" tool, to do a version constraint check
  • Add tests for ast_directive_normalizer.
  • Add an (unused) ChangeDetectorHost
  • Start on the new preserveWhitespace: false.
  • WIP: New runApp/runAppLegacy APIs.
angular2 questions on Stackoverflow (View All Questions)
  • I can't access a controller property in my angular2 view
  • angular2 validate form on button click
  • Angular2 and jQuery 'change' events
  • Angular2 + imgcache unsafe URL
  • Fullstack application how to run Angular2 with Express
  • Unhandled Promise rejection: Cannot find primary outlet to load component Angular2
  • Multiple questions about Nativescript + Angular2 development
  • Angular2 Google maps API drawing a polygon
  • Tracking Google Analytics Page Views in Angular2
  • Angular2 Nested Inputs in components in a form - controls array is empty
  • Is there an equivalent of $sceDelegateProvider.resourceUrlWhitelist and $sceDelegateProvider.resourceUrlBlacklist for Angular2?
  • Angular2 cli - newly created app not clean in Safari
  • angular2-webpack-starter - why is string on the left side of equation?
  • Angular2 on IIS7
  • Cancel observable after first time - Angular2, TypeScript, rxjs/Observable
  • Angular2/PrimeNG - Cant display Dropdown
  • Angular2 rc1 ngFor "Cannot find a differ supporting object '[object Object]' of type 'object'
  • How use js library with jquery on angular2 (typescript)?
  • Angular2 format an array to fit to Google maps api lat lng type
  • In Angular2, is there a way to share providers/directives/etc between two separate bootstrapped apps?
  • Protractor+Jasmin with angular2 E2E testcases
  • How to clear an Observable array when routerlink is clicked in Angular2?
  • How to inject Angular2 with Java
  • Angular2 firebase site indexing
  • Angular2 RC1 error "Supplied parameters do not match any signature of call target"
  • Angular2 OnInit, not getting data from server
  • angular2 – handle same response error multiple times
  • Angular2 nested components variables not accessible in template
  • ionic2 slider is not working with *ngFor - angular2
  • Angular2 Router navigate with multiple params issue
angular2 list of languages used
angular2 latest release notes
5.0.0-alpha+7 5.0.0-alpha+7



NOTE: We now require a dev SDK of >=2.0.0-dev.28.0.

Breaking changes

  • SafeInnerHtmlDirective is no longer injectable.

  • The following types were never intended for external use and are no longer exported by package:angular/security.dart:

    • SafeHtmlImpl
    • SafeScriptImpl
    • SafeStyleImpl
    • SafeResourceUrlImpl
    • SafeUrlImpl
    • SafeValueImpl

    To mark a value as safe, users should inject DomSanitizationService and invoke the corresponding bypassSecurityTrust*() method, instead of constructing these types directly.

  • Private types can't be used in template collection literals bound to an input. This is a consequence of fixing a cast warning that is soon to be an error caused by the code generated for change detecting collection literals in templates. See for more information.

  • OpaqueToken and MultiToken no longer have overridden operator== and hashCode methods/fields. This wasn't supported, in practice, in most of the DI systems, but any custom use of this class may have relied on this.

Bug fixes

  • The view compiler hoists this.rootEl as a final local variable to help Dart2JS know that its type stays the same and that repeated accesses to the class instance variable is not needed. This should help remove interceptors and reduce code-size a bit, especially for users of @HostBinding or @HostListener (

  • Fixed a cast warning caused by untyped code generated for change detecting collection literals in templates.

  • The view compiler is now able to tell when exports which are static reads of the component class are immutable and String type. This allows us to optimize them when they are used in template bindings. See for more information.



  • Maintenance release, supporting newer package versions.



  • Maintenance release.



Breaking changes

  • The following directives are no longer injectable:

    • NgControlStatus
    • RequiredValidator
    • MinLengthValidator
    • MaxLengthValidator
    • PatternValidator
  • Properly typed the generic parameter on subclasses of AbstractControlDirective. Now, NgControl.control will return a Control, and ControlContainer.control will return a ControlGroup. There may be some unnecessary casts that can now be cleaned up.

  • FormBuilder instance methods group, control, and array have been removed. For FormBuilder.control, just call new Control(value, validator) directly. For and FormBuilder.array, use the static methods FormBuilder.controlGroup and FormBuilder.controlArray, respectively. FormBuilder is no longer Injectable.



Breaking changes

  • RouterOutlet is no longer injectable.

  • Renamed to Router.onRouteActivated. is now deprecated and will be removed after next release.

Bug fixes

  • RouterPath.toUrl() no longer generates an incorrect URL with an extra '/' when a parent route has an empty path.



  • Maintenance release, supporting newer package versions.
5.0.0-alpha+6 5.0.0-alpha+6



New features

  • The compiler now reports an actionable error when an annotation is used on a private class member.

  • Added InjectionError and NoProviderError, which may be thrown during dependency injection when InjectionError.enableBetterErrors is set to true. This is an experiment, and we may not complete this feature (and it could be rolled back entirely).

  • Added @GenerateInjector, a way to generate a factory for an Injector completely at compile-time, similar to @Component or @Directive. This replaces the experimental feature @Injector.generate, and can be used in conjunction with the InjectorFactory function type:

import 'my_file.template.dart' as ng;

@GenerateInjector(const [
  const Provider(A, useClass: APrime),
// The generated factory is your method's name, suffixed with `$Injector`.
final InjectorFactory example = example$Injector;
  • You are now able to use an OpaqueToken or MultiToken as an annotation directly instead of wrapping it in @Inject. For example, the following classes are identically understood by AngularDart:
const baseUrl = const OpaqueToken<String>('baseUrl');

class Comp1 {
  Comp1(@Inject(baseUrl) String url);

class Comp2 {
  Comp2(@baseUrl String url);
  • You are now able to extend OpaqueToken or MulitToken to provide custom application-specific injection tokens. For example, providing a specific token for XSRF purposes:
class XsrfToken extends OpaqueToken<String> {
  const XsrfToken();

  providers: const [
    const ValueProvider.forToken(const XsrfToken(), 'ABC123'),
class Comp {
  Comp(@XsrfToken() String token) {
    print(token); // ABC123

Breaking changes

  • Restricted the default visibility of all components and directives to Visibility.local. This means components and directives will no longer be available for injection by their descendants, unless their visibility is explicitly set to Visibility.all. This feature had a cost in code size but was rarely used, so it's now opt-in, rather than the default behavior.

  • We now use a different code-path for the majority of content and view queries, with the exception of places statically typed QueryList. While this is not intended to be a breaking change it could have timing implications.

  • Both COMMON_DIRECTIVES and CORE_DIRECTIVES are now deprecated, and should be replaced by coreDirectives. This is a no-op change (alias).

  • Removed the deprecated EventEmitter class from the public entrypoints.

Bug fixes

  • An invalid event binding (<comp (event-with-no-expression)>) no longer crashes the parser during compilation and instead reports that such a binding is not allowed.

  • Corrects the behavior of Visibility.local to match documentation.

    Previously, a directive with Visibility.local was only injectable via an alias within its defining view. This meant the following was possible

    abstract class Dependency {}
      selector: 'dependency',
      template: '<ng-content></ng-content>',
      providers: const [
        const Provider(Dependency, useExisting: DependencyImpl),
      visibility: Visibility.local,
    class DependencyImpl implements Dependency {}
      selector: 'dependent',
    class Dependent {
      Dependent(Dependency _); // Injection succeeds.
      selector: 'app',
      template: '''
      directives: const [Dependency, Dependent],
    class AppComponent {}

    because both DependencyImpl and Dependent are constructed in the same method, thus the instance of DependencyImpl could be passed directly to Dependent without an injector lookup. However, the following failed

      selector: 'dependency',
      // `Dependent` will fail to inject `Dependency`.
      template: '<dependent></dependent>',
      directives: const [Dependent],
      providers: const [
        const Provider(Dependency, useExisting: DependencyImpl),
      visibility: Visibility.local,
    class DependencyImpl implements Dependency {}

    because no code was generated for children to inject Dependency. This was at odds with the documentation, and optimized for a very specific use case.

    This has been fixed and it's now possible for all children of DependencyImpl to inject Dependency, not just those constructed in the same view.

  • Services that were not marked @Injectable() are no longer skipped when provided in providers: const [ ... ] for a @Directive or @Component. This choice made sense when @Injectable() was required, but this is no longer the case. Additionally, the warning that was printed to console has been removed.

  • It is no longer a build warning to have an injectable service with multiple constructors. This was originally meant to keep injection from being too ambiguous, but there are understood patterns now (first constructor), and there is no alternative present yet. We may re-add this as a warning if there ends up being a mechanism to pick a constructor in the future.

  • It is no longer a build warning to have injectable services or components with named constructor parameters. While they are still not supported for injected, they were always successfully ignored in the past, and showing a warning to the user on every build served no purpose.

  • If a templateUrl is mispelled, a more readable exception is thrown (closes

    [SEVERE]: Unable to read file:
      Ensure the file exists on disk and is available to the compiler.
  • If both template AND templateUrl are supplied, it is now a cleaner build error (closes

    [SEVERE]: Component "CompWithBothProperties" in
      Cannot supply both "template" and "templateUrl"
  • If neither is supplied, it is also a cleaner build error:

    [SEVERE]: Component "CompWithNoTemplate" in
      Requires either a "template" or "templateUrl"; had neither.
  • If a template is a string that points to a file on disk, we now warn:

    [WARNING]: Component "CompMeantTemplateUrl" in
      Has a "template" property set to a string that is a file.
      This is a common mistake, did you mean "templateUrl" instead?
  • If a private class is annotated with @Injectable() the compiler fails. In practice this caused a compilation error later in DDC/Dart2JS, but now the AngularDart compiler will not emit invalid code.

  • Removed spurious/incorrect warnings about classes that are used as interfaces needing @Injectable (or needing to be non-abstract), which are wrong and confusing.

  • Fixed a case where the compiler generated incorrect code when a directive D was applied to the host element of component C where

    • C implements D,
    • C provides D as an alias for itself, and
    • C has Visibility.local.

    Normally the local reference for C would be reused instead of creating a new D. Giving C local visibility incorrectly prevented this assignment and generated code to inject D from the parent injector.

  • Fixed a bug where Provider<List<T>> was treated as Provider<List> when compiled as part of the view compiler (@Component.providers:). Now the additional generic types flow through the compiler.

  • Fixed a case where provider fields weren't type annotated. In some cases this led to DDC warnings that are to become errors.

  • The code generated for injecting a multi-token will now correctly inject a provider that uses an existing directive with Visibility.local. This previously failed if another existing directive with Visibility.all was provided for the same multi-token, after the one with Visibility.local.



New features

  • Router.onNavigationStart now emits the requested navigation path.



New features

  • Add markAsUntouched method to AbstractControl.
  • Add a type annotation, T, to AbstractControl, which is tied to the type of value.
  • ControlGroup now extends AbstractControl<Map<String, dynamic>>.
  • ControlArray now extends AbstractControl<List>.

Breaking Changes

  • Changed type of AbstractControl.statusChanges from Stream<dynamic> to Stream<String>. This now matches the type for AbstractControl.status, which as always been a String.


  • FormBuilder instance methods group, control, and array are now deprecated. For FormBuilder.control, just call new Control(value, validator) directly. For and FormBuilder.array, use the static methods FormBuilder.controlGroup and FormBuilder.controlArray respectively. In a future release, FormBuilder will not not be Injectable.



  • Removed built-in support for package:pageloader. The current version of pageloader relies on dart:mirrors, which is being removed from the web compilers (dart2js, dartdevc). There is a new (internal-only, right now) version of pageloader in development that uses code generation, but it is not available externally yet. We'll consider re-adding support once available or through another package (i.e. angular_pageloader or similar).

  • Added NgTestBed.forComponent, which takes a ComponentFactory<T>, and optionally an InjectorFactory. This allows writing tests entirely free of any invocations of initReflector().

  • BREAKING CHANGE: Adding stabilizers to NgTestBed now takes a factory function of type NgTestStabilizer Function(Injector), which is aliased as NgTestStabilizerFactory. This allows using NgTestBed without any dynamic reflective factories (i.e. initReflector()) and doesn't have impact to most users.



New features

  • Added an internal cli.dart library. See lib/cli.dart for details.
  • Added SplitDartEmitter for internal use.
  • Added $QueryList as a TypeChecker.
  • Expose the $Provider TypeChecker.

Bug fixes

  • Removed all remaining (invalid) references to package:barback.

Breaking changes

  • Added canRead to NgAssetReader.
  • Moved CompilerFlags and Profile to cli.dart.
5.0.0-alpha+5 5.0.0-alpha+5



New features

  • Enables the new template parser by default. This parser is much stricter than the old one, as it will detect things like missing closing tags or quotation marks.

If you need to turn it off temporarily, you need to set the following flag in your build.yaml:

          use_new_template_parser: false
  • Requires source_gen ^0.7.4+2 (was previously ^0.7.0).

  • The compiler behind initReflector() has changed implementations and now uses fully-scoped import statements instead of trying to figure out the original scope (including import prefixes) of your source code. This is not intended to be a breaking change.

Breaking changes

  • We have removed the transformer completely from angular. It is now a requirement that you use build_runner to build angular. For more details, see Building Angular.

  • QueryList is now formally deprecated. See doc/ This feature is not compatible with future restrictions of Dart 2, because QueryList was always created as a QueryList<dynamic>, even though users expected it to be a QueryList<T>. The new API is fully compatible.

  • SlowCompinentLoader is now formally deprecated. See doc/ This feature is not compatible with future restrictions of AngularDart, because it requires collecting metadata and disabling tree-shaking of classes annotated with @Component. The newer API is nearly fully compatible, is faster, and will be supported long-term.

  • Explicitly remove support for ngNonBindable in the new template parser.

  • Both and were deprecated several versions back, but not properly, so warnings never appeared in IDEs. They are now properly deprecated: 'Use @HostBinding() on a getter or @HostListener on a method'.

  • ElementRef is now deprecated. Inject Element or HtmlElement instead. This has unnecessary overhead on-top of the native DOM bindings without any benefit.

Bug fixes

  • The experimental feature @Injector.generate now supports some const expressions in a Provider's useValue: .... There are remaining known issues with this implementation, and useFactory should be used instead if you encounter issues.

  • Fixed a bug where a Injector.get call where Injector is a ReflectiveInjector (which is also the injector most commonly used for both the entrypoint and virtually every test) would throw No provider found for X, where X was a class or factory that was found but one or more of X's dependencies were not found. We now correctly throw No provider found for Y (where Y was that actual missing dependency).

  • OpaqueToken<T> was emitted as OpaqueToken<dynamic> when you used nested views (<div *ngIf="..."><comp></comp></div>), and <comp> was a component or directive that @Inject-ed a typed token (like OpaqueToken<String>); this is now fixed.

  • Trying to use @{Content|View}Child{ren} with Element or HtmlElement (from dart:html) caused a runtime exception, as ElementRef was passed instead. The following now works:

  selector: 'uses-element',
  template: '<div #div>1</div>'
class UsesElement {
  // Could also be HtmlElement.
  Element div;



  • Maintenance release, supporting newer package versions.



Bug fixes

  • linkTypeOf correctly resolves bound types (i.e. <T>) in most cases, and can fallback to dynamic otherwise.

Breaking changes

  • Requires source_gen ^0.7.4+2 (was previously ^0.7.0).

  • linkToReference now requires a second parameter, a LibraryReader, and treats private types (i.e. prefixed with _) as dynamic as the compiler cannot point to them.

  • ReflectableEmitter has been completely replaced with a new implementation.

  • Removed all references and use of determining a prefix of a type. This was no longer used once ReflectableEmitter was re-written.

  • Removed a number of internal flags that were no longer strictly required.



Maintenance release, to support the latest package:angular alpha.



New features

  • Added Router.onNavigationStart to notify subscribers when a navigation request starts.

  • Added the routerProvidersTest module for testing route configurations or components with router dependencies.

Breaking changes

  • Removed fuzzy arrow from MockLocationStrategy. It relied on Dart 1's treatment of dynamic as bottom to mock handling of popstate events without actually relying on dart:html. Since Angular must be tested in the browser anyways, there's no incentive to avoid this dependency. As a consequence, the signature of MockLocationStrategy.onPopState is now unchanged from LocationStrategy.onPopState.



  • Removed support for pub run angular_test. This is no longer strictly needed, as it was just a convenience for running both the build system and test runner. Similar functionality is supported out of the box by build_runner:
$ pub run build_runner test
Other projects in Dart