Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

v0.16.0+1 anchor href using _href is incorrect for elements within packages #35

Closed
mark1010 opened this issue Mar 16, 2015 · 3 comments
Closed

Comments

@mark1010
Copy link

_href="{{observableValue}}" links are rendered incorrectly, when the tag / element is placed inside of a package. The behaviour has changed since 0.15.5 which appears to work correctly.

To reproduce, my-element must be in the package /lib path.

mypackage/lib/my_element.html

<link rel="import" href="../../packages/polymer/polymer.html">
<polymer-element name="my-element">
    <template>
            <a _href="{{url}}">link</a>
    </template>
    <script type="application/dart" src="my_element.dart"></script>
</polymer-element>

mypackage/lib/my_element.dart

import 'package:polymer/polymer.dart';
@CustomTag('my-element')
class MyElement extends PolymerElement {
    @observable String url = "https://github.com/dart-lang/polymer-dart";
    MyElement.created() : super.created();  
}

Polymer 0.15.5 anchor is rendered correctly as:

https://github.com/dart-lang/polymer-dart

Polymer 0.16.0+1 anchor is rendered incorrectly as:

localhost:8080/packages/mypackage/https://github.com/dart-lang/polymer-dart

If the element is placed alongside index.html under /web, _href works correctly.

Dart Editor 1.9.0.dev_10_04 (DEV) / Chromium Version 39.0.2171.99

@mark1010 mark1010 changed the title anchor href using _href is incorrect for elements within packages using Polymer 0.16.0+1 v0.16.0+1 anchor href using _href is incorrect for elements within packages Mar 17, 2015
@jakemac53
Copy link
Contributor

As a hack for now if the value never changes you can switch to using a one-time binding like [[url]].

This is a somewhat complicated issue because the code that does the url normalizing is not actually in the polymer package any more, so it doesn't know about bindings directly. Stay tuned, as soon as we come up with a solution I will follow up.

jakemac53 added a commit to dart-archive/web-components that referenced this issue Mar 18, 2015
@jakemac53
Copy link
Contributor

fix is published as polymer 0.16.0+6

@mark1010
Copy link
Author

thanks

On 19 Mar 2015, at 20:20, Jacob MacDonald notifications@github.com wrote:

fix is published as polymer 0.16.0+6


Reply to this email directly or view it on GitHub #35 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants