Skip to content

Commit 0a152f3

Browse files
committed
Repo case for dart-lang/sdk#25969
1 parent ab85f9e commit 0a152f3

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

example/item/main.dart

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import 'package:bwu_ng_elements/icon.dart'
99
show BwuIcon, BwuIconSetSvg, IconSetRegistry;
1010
import 'package:bwu_ng_elements/item.dart' show BwuItem;
1111

12-
import 'package:angular2/core.dart' show Component, OnInit, provide;
12+
import 'package:angular2/core.dart' show Component, OnInit, ViewEncapsulation, provide;
1313
import 'package:bwu_ng_elements/icons.dart' show BwuIcons;
1414
import 'package:bwu_ng_elements/item/icon_item.dart';
1515

@@ -24,10 +24,22 @@ void main() {
2424
]);
2525
}
2626

27+
///
28+
@Component(
29+
selector: 'content-element',
30+
// encapsulation: ViewEncapsulation.Native,
31+
template: '''
32+
<div>
33+
<ng-content></ng-content>
34+
<div>
35+
''')
36+
class ContentElement {
37+
}
38+
2739
/// Example root component
2840
@Component(
2941
selector: 'app-element',
30-
directives: const [BwuIcon, BwuIcons, BwuItem, BwuIconItem],
42+
directives: const [BwuIcon, BwuIcons, BwuItem, BwuIconItem, ContentElement],
3143
//styleUrls: const ['app_element.css'],
3244
styles: const [
3345
'''
@@ -40,11 +52,12 @@ void main() {
4052
<bwu-icons></bwu-icons>
4153
<h1>BWU NG Elements Item Demo</h1>
4254
<div class="container">
43-
<bwu-item>Item</bwu-item>
44-
<bwu-icon-item>
45-
<bwu-icon icon="inbox" item-icon></bwu-icon>
46-
Inbox
55+
56+
<bwu-icon-item *ngFor="#item of iconSetNames">
57+
<bwu-icon *ngIf="item.length > 3" icon="chevron-right"
58+
width="14px" class="has-submenu"></bwu-icon>
4759
</bwu-icon-item>
60+
4861
<div>
4962
''')
5063
class AppElement implements OnInit {

lib/item/icon_item.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'package:bwu_ng_elements/item.dart';
1919
'tabindex': '0',
2020
'role': 'option',
2121
'[class.bwu-active]': 'isActive'
22-
} //,
23-
// encapsulation: ViewEncapsulation.Native
24-
)
22+
},
23+
encapsulation: ViewEncapsulation.Native
24+
)
2525
class BwuIconItem extends BwuItem {}

lib/item/item.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import 'package:angular2/core.dart' show Component, Input, ViewEncapsulation;
1111
'tabindex': '0',
1212
'role': 'option',
1313
'[class.bwu-active]': 'isActive'
14-
} //,
15-
// encapsulation: ViewEncapsulation.Native
16-
)
14+
},
15+
encapsulation: ViewEncapsulation.Native
16+
)
1717
class BwuItem {
1818
/// Whether the item is in active state.
1919
@Input()

0 commit comments

Comments
 (0)