question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: @angular2-material/all

See original GitHub issue

it would be great if we had @angular2-material/all that also exported MATERIAL_DIRECTIVES and MATERIAL_PROVIDERS. At the moment, you need to require everything manually

import {MD_SIDENAV_DIRECTIVES} from '@angular2-material/sidenav';
import {MdToolbar} from '@angular2-material/toolbar';
import {MdButton} from '@angular2-material/button';
import {MdCheckbox} from '@angular2-material/checkbox';
import {MdRadioButton} from '@angular2-material/radio';
import {MdSpinner} from '@angular2-material/progress-circle';
import {MD_CARD_DIRECTIVES} from '@angular2-material/card';
const MATERIAL_DIRECTIVES = [
  ...MD_SIDENAV_DIRECTIVES,
  ...[ MdToolbar, MdButton, MdCheckbox, MdRadioButton, MdSpinner ],
  ...MD_CARD_DIRECTIVES
];
  "dependencies": {
    "@angular2-material/button": "^2.0.0-alpha.1",
    "@angular2-material/card": "^2.0.0-alpha.1",
    "@angular2-material/checkbox": "^2.0.0-alpha.1",
    "@angular2-material/core": "^2.0.0-alpha.1",
    "@angular2-material/progress-circle": "^2.0.0-alpha.1",
    "@angular2-material/radio": "^2.0.0-alpha.1",
    "@angular2-material/sidenav": "^2.0.0-alpha.1",
    "@angular2-material/toolbar": "^2.0.0-alpha.1",
    "angular2": "2.0.0-beta.12",
    "core-js": "^2.1.5",
    "rxjs": "5.0.0-beta.2",
    "zone.js": "0.6.6"
  },

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:44
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
naveedahmed1commented, May 30, 2016

I believe both options should be supported, i.e

import all MATERIAL_DIRECTIVES and MATERIAL_PROVIDER Good for the projects utilizing all/most of the directive/providers

import specific MATERIAL_DIRECTIVES and MATERIAL_PROVIDER Good for projects utilizing only specific directives

May be more options could be given by grouping related directives:

@angular2-material/all import all directives

@angular2-material/form-directives import form related directives such as input, checkboxes, radio, slide toggle, select etc.

@angular2-material/ui import ui related directives related directives such as side nav, menu, list, dialog, tabs etc.

1reaction
devversioncommented, Oct 4, 2016

@jelbourn I think this can be closed now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Material You Support · Issue #22738 · angular/components
feat (all components): Material You/3 #24447. Closed. @angular-robot ... Angular Material mdc is depend on material-components-web?
Read more >
Table | Angular Material
UI component infrastructure and Material Design components for mobile and desktop Angular web applications.
Read more >
Theming Angular Material
As an alternative to listing every component that your application uses, Angular Material offers Sass mixins that includes styles for all components in...
Read more >
Table | Angular Material
UI component infrastructure and Material Design components for mobile and desktop Angular web applications.
Read more >
Learn Angular Material - Full Tutorial - YouTube
Learn how to use Angular Material in this full tutorial course for beginners. Angular Material is a UI component library for Angular JS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found