mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore: move mat re-exports to package where their metadata lives (#7193)
This also required creating a module file for every component because the max re-export can't be in the same file as the module definition or else ngc will *only* export the alias.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {MdCommonModule} from '@angular/material/core';
|
||||
import {OverlayModule} from '@angular/cdk/overlay';
|
||||
import {MdMenu, MD_MENU_DEFAULT_OPTIONS} from './menu-directive';
|
||||
import {MdMenuItem} from './menu-item';
|
||||
import {MdMenuTrigger, MD_MENU_SCROLL_STRATEGY_PROVIDER} from './menu-trigger';
|
||||
import {MdRippleModule} from '@angular/material/core';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
OverlayModule,
|
||||
CommonModule,
|
||||
MdRippleModule,
|
||||
MdCommonModule,
|
||||
],
|
||||
exports: [MdMenu, MdMenuItem, MdMenuTrigger, MdCommonModule],
|
||||
declarations: [MdMenu, MdMenuItem, MdMenuTrigger],
|
||||
providers: [
|
||||
MD_MENU_SCROLL_STRATEGY_PROVIDER,
|
||||
{
|
||||
provide: MD_MENU_DEFAULT_OPTIONS,
|
||||
useValue: {
|
||||
overlapTrigger: true,
|
||||
xPosition: 'after',
|
||||
yPosition: 'below',
|
||||
},
|
||||
}
|
||||
],
|
||||
})
|
||||
export class MdMenuModule {}
|
||||
Reference in New Issue
Block a user