Giter Site home page Giter Site logo

js-framework-angularjs2-angular2-dart-analyzer's Introduction

Angular2 Dart Analysis Plugins

Annotation analysis in Dart files

  • Build models for @Directive and @Component annotations:
    • Parse selector.
    • Build inputs.
    • Report problems for invalid selectors, unresolved input setters, etc.
  • Build models for @View annotations:
    • Resolve templateUrl argument.
    • Validate that specified directives are valid directive class literals.
  • Resolve inline @View templates in Dart files.
  • Resolve external @View templates referenced from Dart files in context of specified directives and view class members.

Templates resolution

Templates resolution is implemented only partially. Currently the following feature are done.

  • Resolve element tags to @Component selectors.
  • Resolve of attribute names in forms name, [name], bind-name, (event), on-event to corresponding inputs and events.
  • Resolve expressions in interpolations like <div>{{user.name}}</div>.
  • Resolve expressions in bound inputs like <text-panel [text]='user.name'>.
  • Support for the template attribute <div template='ng-if items.isNotEmpty'>Has items</div>.

Integration with Dart Analysis Server

To provide information for DAS clients the server_plugin plugin contributes several extensions.

  • Angular analysis errors are automatically merged into normal errors notifications for Dart and HTML files.
  • Navigation extension contributes navigation regions:
    • In external HTML templates.
    • In inline templates in Dart files.
    • In Dart annotations:
      • navigation from templateUrl to the corresponding HTML files.
      • navigation from input declarations to setters, e.g. to text in inputs: const ['text: my-text'].
  • Occurrences extension reports regions where every Dart element or an input is used in a Dart or HTML file. So, clients of DAS can highlight all of the whe user select one.

js-framework-angularjs2-angular2-dart-analyzer's People

Contributors

scheglov avatar keertip avatar

Watchers

James Cloos avatar PKCodeBox avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.