-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dropdown): added inline style of adding dropdown, enabled by def…
…ault if container is set, than placement and dynamic place of dropdown menu will work fixes #1860, fixes #1862
- Loading branch information
Showing
5 changed files
with
55 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { TemplateRef, ViewContainerRef } from '@angular/core'; | ||
|
||
export class BsComponentRef<T> { | ||
templateRef: TemplateRef<T>; | ||
viewContainer: ViewContainerRef; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import { Directive, TemplateRef } from '@angular/core'; | ||
import { Directive, TemplateRef, ViewContainerRef } from '@angular/core'; | ||
import { BsDropdownState } from './bs-dropdown.state'; | ||
|
||
@Directive({ | ||
selector: '[bsDropdownMenu],[dropdownMenu]', | ||
exportAs: 'bs-dropdown-menu' | ||
}) | ||
export class BsDropdownMenuDirective { | ||
constructor(private _state: BsDropdownState, | ||
private _templateRef: TemplateRef<any>) { | ||
_state.resolveDropdownMenu(_templateRef); | ||
constructor(_state: BsDropdownState, | ||
_viewContainer: ViewContainerRef, | ||
_templateRef: TemplateRef<any>) { | ||
_state.resolveDropdownMenu({ | ||
templateRef: _templateRef, | ||
viewContainer: _viewContainer | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters