File tree Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 4
4
"license" : " MIT" ,
5
5
"scripts" : {
6
6
"ng" : " ng" ,
7
- "start" : " ng serve" ,
7
+ "start" : " ng serve --host 0.0.0.0 --disable-host-check " ,
8
8
"build" : " ng build --prod --base-href \" https://nglibrary.github.io/ngx-choosy-documentation/\" " ,
9
9
"test-app" : " ng test" ,
10
10
"test" : " echo \" No test specified\" && exit 0" ,
Original file line number Diff line number Diff line change
1
+ #box {
2
+ text-align : center ;
3
+ }
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ export class AppComponent {
27
27
es5IsOpen = false ;
28
28
fthr = f ;
29
29
menu = [ ] ;
30
+
31
+ buttonMenu : any = [ ] ;
30
32
ngOnInit ( ) {
31
33
this . addresses = addresses ;
32
34
this . colors = colors ;
@@ -44,6 +46,14 @@ export class AppComponent {
44
46
{ name : 'Changelog' }
45
47
] ;
46
48
49
+ this . buttonMenu = [
50
+ { name : 'Dashboard' , icon : 'cogs' } ,
51
+ { name : 'Account' , icon : 'user-circle-o' } ,
52
+ { name : 'Messages' , icon : 'envelope-open' } ,
53
+ { name : 'Language' , icon : 'globe' } ,
54
+ { name : 'Logout' , icon : 'sign-out' }
55
+ ] ;
56
+
47
57
}
48
58
ngAfterViewInit ( ) {
49
59
Original file line number Diff line number Diff line change
1
+ < div id ="box ">
2
+ < button type ="button " class ="btn " choosyButtonSelect [options] ="buttonMenu " [itemTemplate] ="oneListItemTpl " [selectedItemTemplate] ="oneSelectedItemTpl "> Menu</ button >
3
+ </ div >
4
+
5
+ < button type ="button " class ="btn " choosyButtonSelect [options] ="['a','b'] "> list</ button >
6
+
7
+
8
+ < ng-template #oneListItemTpl let-item >
9
+ < div >
10
+ < i class ="fa fa-{{item.icon}} "> </ i >
11
+ < span > {{item.name}}</ span >
12
+ </ div >
13
+ </ ng-template >
14
+
15
+ < ng-template #oneSelectedItemTpl let-item >
16
+ < div >
17
+ < span > {{item.name}}</ span >
18
+ </ div >
19
+ </ ng-template >
You can’t perform that action at this time.
0 commit comments