angularjs-material

Angular Material Datepicker returns one day before the exact date

三世轮回 提交于 2019-12-06 03:31:25
Im using angular material in my web site and when I send the date to my web api, it shows on day before the selected date. For an example if I put in 2016-01-03 then it will send 2016-01-02. How can I fix this issue. I haven't change any code form the original code provided in angular material web site the link to the code is below https://material.angularjs.org/latest/demo/datepicker Just try to use angular-moment as following. var temp =(moment.utc(local.date)); I wrote a full article about this. FIX IN MD-DATEPICKER TO GET THESELECTED DATE we recently faced the same , adjusting the value

How to get rid off multiple style tags inserted to head by AngularJS Material?

拟墨画扇 提交于 2019-12-04 22:36:20
AngularJS Material inserts multiple (around 30) style tags with md-theme-style attribute. I guess it's some kind of performance tuning but I would rather do it myself - I don't need an external framework to pollute my HTML in this nasty way. Any thoughts on how to get rid of the style tags? Robben_Ford_Fan_boy I do not know if it is worth the hassle. Please back-up your work, I have not tested any of this: Angular-material includes some default theme css as a const variable in JavaScript. You can view this code in angular-material.js at the bottom starting with the line: angular.module(

Angular MaterialJS Dialog form with different save options

对着背影说爱祢 提交于 2019-12-04 21:10:35
I'm trying to save form data in mdDialog but with options of (save and close) the dialog and (save) which will save the form data then open another dialog empty dialog without having to close and open the mdDialog again, the problem is how to call same SaveData function in same form for both save operations? $scope.saveData = function (isValid) { if (isValid) { updateservice.postdata($scope.myformdata) .then(function (data) { $mdDialog.hide(); }); // error handling } }; and in the template: <md-dialog> <form name="form" ng-submit="saveData(form.$validform)" novalidate> <md-dialog-content> <div

How to align the radio buttons horizontally in angular material?

此生再无相见时 提交于 2019-12-04 14:57:33
问题 I was expecting a in-built directive or a tag for this but probably not according to their documentation. This is the example. <div class="radioButtondemoBasicUsage" ng-app="MyApp"> <form ng-submit="submit()" ng-controller="AppCtrl"> <p>Selected Value: <span class="radioValue">{{ data.group1 }}</span> </p> <md-radio-group ng-model="data.group1"> <md-radio-button value="Apple" class="md-primary">Apple</md-radio-button> <md-radio-button value="Banana"> Banana </md-radio-button> <md-radio-button

How to align the radio buttons horizontally in angular material?

倾然丶 夕夏残阳落幕 提交于 2019-12-03 09:19:20
I was expecting a in-built directive or a tag for this but probably not according to their documentation. This is the example . <div class="radioButtondemoBasicUsage" ng-app="MyApp"> <form ng-submit="submit()" ng-controller="AppCtrl"> <p>Selected Value: <span class="radioValue">{{ data.group1 }}</span> </p> <md-radio-group ng-model="data.group1"> <md-radio-button value="Apple" class="md-primary">Apple</md-radio-button> <md-radio-button value="Banana"> Banana </md-radio-button> <md-radio-button value="Mango">Mango</md-radio-button> </md-radio-group> You do not need to override any default CSS:

how to write css for a specific breakpoint in angular material

我是研究僧i 提交于 2019-12-03 08:52:08
问题 I am trying to write CSS for a div, that should apply only when a particular breakpoint is hit, eg. sm, md or lg. I'm using angular-material (https://material.angularjs.org). I know that this can be done using media queries @media (max-width: 480px) { ... } but i'm looking for a angular-material way of doing this. 回答1: I'm using the $mdMedia service for that, see: https://material.angularjs.org/latest/#/api/material.core/service/$mdMedia Additionally you can use it in a template directly e.g.

How to use <md-icon> in Angular Material?

旧街凉风 提交于 2019-12-03 00:10:33
问题 I was wondering how to use Material's icons, as this is not working: <material-icon icon = "/img/icons/ic_access_time_24px.svg"> </material-icon> I guess there is a problem with the path given as parameter to the the icon attribute. I would like to know where this icon folder actually is? 回答1: As the other answers didn't address my concern I decided to write my own answer. The path given in the icon attribute of the md-icon directive is the URL of a .png or .svg file lying somewhere in your

how to write css for a specific breakpoint in angular material

蓝咒 提交于 2019-12-02 22:48:29
I am trying to write CSS for a div, that should apply only when a particular breakpoint is hit, eg. sm, md or lg. I'm using angular-material ( https://material.angularjs.org ). I know that this can be done using media queries @media (max-width: 480px) { ... } but i'm looking for a angular-material way of doing this. I'm using the $mdMedia service for that, see: https://material.angularjs.org/latest/#/api/material.core/service/ $mdMedia Additionally you can use it in a template directly e.g. with an ng-class directive: // In your controller: $scope.$mdMedia = $mdMedia; // In your template: <div

How to use <md-icon> in Angular Material?

倖福魔咒の 提交于 2019-12-02 13:54:54
I was wondering how to use Material's icons, as this is not working: <material-icon icon = "/img/icons/ic_access_time_24px.svg"> </material-icon> I guess there is a problem with the path given as parameter to the the icon attribute. I would like to know where this icon folder actually is? Adil Malik As the other answers didn't address my concern I decided to write my own answer. The path given in the icon attribute of the md-icon directive is the URL of a .png or .svg file lying somewhere in your static file directory. So you have to put the right path of that file in the icon attribute. p.s

I want a blank option with md-select and I want it not to validate when required

人盡茶涼 提交于 2019-12-02 09:15:47
问题 I'm using Angular Material and md-select and I would like to make a blank option such that when you select it, you have no value in the select. In the case that I make it required, then I would like this option returning false at the check. Here's a demo: https://plnkr.co/edit/FZ8xt5ZCRJY3fFMh3fFU?p=preview <html> <head> <meta charset="utf-8" /> <title>AngularJS Plunker</title> <script>document.write('<base href="' + document.location + '" />');</ript> <link rel="stylesheet" href="style.css"