polymer_app_router 0.2.4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 1

polymer_app_router

Routing for polymer dart

Installing

Add to your pubspec.yaml

dependencies:
    polymer_app_router: "^0.0.2"

then pub get

then import

import 'package:polymer_app_router/polymer_app_router.dart';

Usage

<polymer-app-router selected="{{selected}}">
    <polymer-app-route name="home" path="" is-default>home</polymer-app-route>
    <polymer-app-route name="one" path="one">one</polymer-app-route>
    <polymer-app-route name="two" path="two">two</polymer-app-route>
</polymer-app-router>

API

PolymerRouter.goToName(String name,
      {Map parameters,
      Route startingFrom,
      bool replace: false,
      Map queryParameters,
      bool forceReload: false})
      
PolymerRouter.goToDefault(
      {Map parameters,
      Route startingFrom,
      bool replace: false,
      Map queryParameters,
      bool forceReload: false})
      

Current Route name

  String PolymerRouter.currentRouteName;

Current Page

  PolymerAppRoute PolymerRouter.currentPage;
  

Changelog

0.2.0

  • hierarchical routes now supported (a/b/c ...)
  • Breaking Changes: the element in the page class is now optional

0.1.2

  • Remove polymer_elements (iron-pages)
  • Add Readme

0.1.1

  • Initial version

example/main.dart

import 'package:polymer/polymer.dart';
import 'app.dart';

main() async {
  await initPolymer();
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  polymer_app_router: ^0.2.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:polymer_app_router/polymer_app_router.dart';
  
Version Uploaded Documentation Archive
0.2.4 May 5, 2016 Go to the documentation of polymer_app_router 0.2.4 Download polymer_app_router 0.2.4 archive
0.2.3 Mar 30, 2016 Go to the documentation of polymer_app_router 0.2.3 Download polymer_app_router 0.2.3 archive
0.2.2 Jan 27, 2016 Go to the documentation of polymer_app_router 0.2.2 Download polymer_app_router 0.2.2 archive
0.2.1 Jan 27, 2016 Go to the documentation of polymer_app_router 0.2.1 Download polymer_app_router 0.2.1 archive
0.2.0 Jan 24, 2016 Go to the documentation of polymer_app_router 0.2.0 Download polymer_app_router 0.2.0 archive
0.1.2 Jan 21, 2016 Go to the documentation of polymer_app_router 0.1.2 Download polymer_app_router 0.1.2 archive
0.1.0 Jan 15, 2016 Go to the documentation of polymer_app_router 0.1.0 Download polymer_app_router 0.1.0 archive
0.0.6 Jan 5, 2016 Go to the documentation of polymer_app_router 0.0.6 Download polymer_app_router 0.0.6 archive
0.0.5+1 Dec 29, 2015 Go to the documentation of polymer_app_router 0.0.5+1 Download polymer_app_router 0.0.5+1 archive
0.0.5 Dec 29, 2015 Go to the documentation of polymer_app_router 0.0.5 Download polymer_app_router 0.0.5 archive

All 14 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
2
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
1
Learn more about scoring.

We analyzed this package on Jul 20, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.69.0
  • pana: 0.11.7

Platforms

Detected platforms: web

Primary library: package:polymer_app_router/polymer_app_router.dart with components: html, js, mirrors.

Issues and suggestions

Fix lib/behavior/polymer_router_behavior.dart.

Analysis of lib/behavior/polymer_router_behavior.dart failed with 10 errors, 2 hints, including:

line 32 col 5: The method 'notifyPath' isn't defined for the class 'PolymerRouterBehavior'.

line 78 col 37: The method '$$' isn't defined for the class 'PolymerRouterBehavior'.

line 88 col 7: The method 'notifyPath' isn't defined for the class 'PolymerRouterBehavior'.

line 100 col 7: The method 'notifyPath' isn't defined for the class 'PolymerRouterBehavior'.

line 110 col 34: The getter 'name' isn't defined for the class 'Element'.

Fix lib/behavior/polymer_app_route_behavior.dart.

Analysis of lib/behavior/polymer_app_route_behavior.dart failed with 3 errors:

line 23 col 5: The method 'notifyPath' isn't defined for the class 'PolymerAppRouteBehavior'.

line 31 col 5: The method 'notifyPath' isn't defined for the class 'PolymerAppRouteBehavior'.

line 39 col 5: The method 'notifyPath' isn't defined for the class 'PolymerAppRouteBehavior'.

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Use constrained dependencies.

The pubspec.yaml contains 3 dependencies without version constraints. Specify version ranges for the following dependencies: analyzer, polymer, reflectable.

Package is too old.

The package was released more than two years ago.

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v1 release.

While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction of the API.

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/page.dart (Run dartfmt to format lib/page.dart.)
  • lib/polymer_app_route/polymer_app_route.dart (Run dartfmt to format lib/polymer_app_route/polymer_app_route.dart.)
  • lib/polymer_app_router.dart (Run dartfmt to format lib/polymer_app_router.dart.)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.13.0 <2.0.0
analyzer >=0.27.0 0.29.5 0.32.3
browser ^0.10.0 0.10.0+3
dart_to_js_script_rewriter ^0.1.0+4 0.1.0+4 1.0.3
initialize >=0.6.0 <0.7.0 0.6.2+7
polymer >=1.0.0-rc.14 1.0.0-rc.19
reflectable >=0.5.0 1.0.3 2.0.1
route_hierarchical ^0.6.2 0.6.2 0.7.0
web_components ^0.12.0 0.12.5
Transitive dependencies
args 0.13.7 1.4.4
async 2.0.8
barback 0.15.2+16
charcode 1.1.2
cli_util 0.1.3+2
code_transformers 0.5.1+5
collection 1.14.11
convert 2.0.2
crypto 2.0.6
csslib 0.13.7+1 0.14.4+1
dart_style 0.2.16 1.1.3
glob 1.1.7
html 0.12.2+2 0.13.3+2
isolate 0.2.3 2.0.2
logging 0.11.3+2
meta 1.1.6
package_config 1.0.5
path 1.6.2
plugin 0.2.0+3
polymer_interop 1.0.0-rc.10
pool 1.3.5
source_maps 0.10.7
source_span 1.4.1
stack_trace 1.9.3
string_scanner 1.0.3
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15