feat(url_resolver): support package: urls (fixes #2991)

This commit is contained in:
Yegor
2015-07-23 00:00:14 -07:00
committed by yjbanov
parent 771c0170d9
commit 408618b836
19 changed files with 61 additions and 75 deletions

View File

@ -1,2 +1,2 @@
<style>@import "angular2_material/src/components/button/button.css";</style>
<style>@import "package:angular2_material/src/components/button/button.css";</style>
<span class="md-button-wrapper"><ng-content></ng-content></span>

View File

@ -3,7 +3,7 @@ import {isPresent} from 'angular2/src/facade/lang';
@Component({selector: '[md-button]:not([href])'})
@View({templateUrl: 'angular2_material/src/components/button/button.html'})
@View({templateUrl: 'package:angular2_material/src/components/button/button.html'})
export class MdButton {
// TODO(jelbourn): Ink ripples.
}
@ -15,7 +15,7 @@ export class MdButton {
host: {'(click)': 'onClick($event)', '[tabIndex]': 'tabIndex'},
lifecycle: [LifecycleEvent.onChange]
})
@View({templateUrl: 'angular2_material/src/components/button/button.html'})
@View({templateUrl: 'package:angular2_material/src/components/button/button.html'})
export class MdAnchor {
tabIndex: number;

View File

@ -1,4 +1,4 @@
<style>@import "angular2_material/src/components/checkbox/checkbox.css";</style>
<style>@import "package:angular2_material/src/components/checkbox/checkbox.css";</style>
<div (^click)="toggle($event)">
<div class="md-checkbox-container">

View File

@ -15,7 +15,10 @@ import {NumberWrapper} from 'angular2/src/facade/lang';
'[attr.aria-disabled]': 'disabled'
}
})
@View({templateUrl: 'angular2_material/src/components/checkbox/checkbox.html', directives: []})
@View({
templateUrl: 'package:angular2_material/src/components/checkbox/checkbox.html',
directives: []
})
export class MdCheckbox {
/** Whether this checkbox is checked. */
checked: boolean;

View File

@ -210,7 +210,7 @@ export class MdDialogConfig {
host: {'(body:^keydown)': 'documentKeypress($event)'},
})
@View({
templateUrl: 'angular2_material/src/components/dialog/dialog.html',
templateUrl: 'package:angular2_material/src/components/dialog/dialog.html',
directives: [forwardRef(() => MdDialogContent)]
})
class MdDialogContainer {

View File

@ -16,7 +16,7 @@ import {Math} from 'angular2/src/facade/math';
properties: ['cols', 'rowHeight', 'gutterSize'],
lifecycle: [LifecycleEvent.onAllChangesDone]
})
@View({templateUrl: 'angular2_material/src/components/grid_list/grid_list.html'})
@View({templateUrl: 'package:angular2_material/src/components/grid_list/grid_list.html'})
export class MdGridList {
/** List of tiles that are being rendered. */
tiles: List<MdGridTile>;
@ -223,7 +223,7 @@ export class MdGridList {
},
lifecycle: [LifecycleEvent.onDestroy, LifecycleEvent.onChange]
})
@View({templateUrl: 'angular2_material/src/components/grid_list/grid_tile.html'})
@View({templateUrl: 'package:angular2_material/src/components/grid_list/grid_tile.html'})
export class MdGridTile {
gridList: MdGridList;
_rowspan: number;

View File

@ -1,4 +1,4 @@
<style>@import "angular2_material/src/components/grid_list/grid-list.css";</style>
<style>@import "package:angular2_material/src/components/grid_list/grid-list.css";</style>
<figure>
<ng-content></ng-content>

View File

@ -1,7 +1,9 @@
import {Component, View} from 'angular2/angular2';
@Component({selector: 'md-progress-circular'})
@View({templateUrl: 'angular2_material/src/components/progress-circular/progress_circular.html'})
@View({
templateUrl: 'package:angular2_material/src/components/progress-circular/progress_circular.html'
})
export class MdProgressCircular {
constructor() {}
}

View File

@ -1,4 +1,4 @@
<style>@import "angular2_material/src/components/progress-linear/progress_linear.css";</style>
<style>@import "package:angular2_material/src/components/progress-linear/progress_linear.css";</style>
<div class="md-progress-linear-container md-ready">
<div class="md-progress-linear-dashed"></div>

View File

@ -15,7 +15,7 @@ import {Math} from 'angular2/src/facade/math';
}
})
@View({
templateUrl: 'angular2_material/src/components/progress-linear/progress_linear.html',
templateUrl: 'package:angular2_material/src/components/progress-linear/progress_linear.html',
directives: []
})
export class MdProgressLinear {

View File

@ -1,4 +1,4 @@
<style>@import "angular2_material/src/components/radio/radio-button.css";</style>
<style>@import "package:angular2_material/src/components/radio/radio-button.css";</style>
<!-- TODO(jelbourn): render the radio on either side of the content -->

View File

@ -36,7 +36,7 @@ var _uniqueIdCounter: number = 0;
'[attr.aria-activedescendant]': 'activedescendant'
}
})
@View({templateUrl: 'angular2_material/src/components/radio/radio_group.html'})
@View({templateUrl: 'package:angular2_material/src/components/radio/radio_group.html'})
export class MdRadioGroup {
/** The selected value for the radio group. The value comes from the options. */
value: any;
@ -190,7 +190,10 @@ export class MdRadioGroup {
'[attr.aria-disabled]': 'disabled'
}
})
@View({templateUrl: 'angular2_material/src/components/radio/radio_button.html', directives: []})
@View({
templateUrl: 'package:angular2_material/src/components/radio/radio_button.html',
directives: []
})
export class MdRadioButton {
/** Whether this radio is checked. */
checked: boolean;

View File

@ -1,2 +1,2 @@
<style>@import "angular2_material/src/components/radio/radio-group.css";</style>
<style>@import "package:angular2_material/src/components/radio/radio-group.css";</style>
<ng-content></ng-content>

View File

@ -1,4 +1,4 @@
<style>@import "angular2_material/src/components/switcher/switch.css";</style>
<style>@import "package:angular2_material/src/components/switcher/switch.css";</style>
<div (^click)="toggle($event)">
<div class="md-switch-container">

View File

@ -16,7 +16,8 @@ import {NumberWrapper} from 'angular2/src/facade/lang';
'[attr.role]': '"checkbox"'
}
})
@View({templateUrl: 'angular2_material/src/components/switcher/switch.html', directives: []})
@View(
{templateUrl: 'package:angular2_material/src/components/switcher/switch.html', directives: []})
export class MdSwitch {
/** Whether this switch is checked. */
checked: boolean;