在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):mseemann/angular2-mdl开源软件地址(OpenSource Url):https://github.com/mseemann/angular2-mdl开源编程语言(OpenSource Language):TypeScript 57.0%开源软件介绍(OpenSource Introduction):Angular 14 components, directives and styles based on material design lite https://getmdl.io (v: 1.3.0). This package assumes that you are building an Angular app with TypeScript. Angular CLI makes it even easier but isn't required.
Status of the npm package version 14 (mdl version 1.3.0; angular 14)
Installationnpm install @angular-mdl/core --save css from material-design-liteYou may include the material-design-lite css in your html and you're done! <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css"/>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> Under http://mseemann.io/angular2-mdl/theme you'll find a customizing tool to change the theme colors. How to use the scss files from material-design-liteThis package includes the scss files from material-design-lite. With these files you are able to change the colors and other variables in your own scss files: @import "~@angular-mdl/core/scss/color-definitions";
$color-primary: $palette-blue-500;
$color-primary-dark: $palette-blue-700;
$color-accent: $palette-amber-A200;
$color-primary-contrast: $color-dark-contrast;
$color-accent-contrast: $color-dark-contrast;
@import "~@angular-mdl/core/scss/material-design-lite"; To make this working you need to find out the way how you could tell your build system where the scss is located. For
example with webpack you can use the special sassLoader: {
includePaths: [util.root('node_modules', '@angular-mdl/core', 'scss')]
} @angular-mdl/*Additional components for @angular-mdl/core that are not part of material design lite
The components
These components support AOT and TreeShaking! How to use the componentsInstall the components via npm. Please check out the individual readme for each component from the table above. Starting with version 0.2.0 the components each have no css styles imported by default. You need to setup your build pipeline to include the scss files from each component you want to use. This makes it possible to configure the theming for the components you want to use. If you are using webpack you may use the special webpack import syntax for node_modules:
Another way is to include each component folder in the search path for your scss preprocessor. An example for webpack:
Development
The coverage report is stored under: coverage/coverage-remap/index.html ContributingEvery contribution is welcome. Please checkout the CONTRIBUTION.md file. RemarksAnd if you would like to see a real world app that uses this package have a look at https://www.yovelino.de/apps/tour-planner/. License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论