angular-material

Angular Material mdTabs : is it possible to have vertical tabs?

邮差的信 提交于 2020-01-03 07:08:07
问题 I am looking for Tabs displayed top to bottom with tab navigation on the left. Is there anyway this can be achieved in Angular Material library? 回答1: This codepen by Rahul Sagore uses vanilla Material, not specifically for Angular, but it's exactly what you want. I was looking for the same thing as you; it's a shame Material doesn't offer this, but I can see how it would go against their principles and make Material too extensive. It comprises of custom css (perhaps overriding, I'm not sure)

How to fire selectionChange event on an Angular Material MatSelect from test code

会有一股神秘感。 提交于 2020-01-03 06:00:48
问题 I have a Component which embeds an Angular Material MatSelect element. In a test that I am writing, I need to simulate the selection of a certain option and make sure that the selectionChange Observable associated to that MatSelect element actually fires. So far my code is const mySelect: MatSelect = fixture.nativeElement.querySelector('#mySelect'); mySelect.value = 'new value'; But unfortunately this is not making the mySelect.selectionChange notify, and therefore my test work. Any idea on

Multiple Date Select in Material datePicker (Angular)

瘦欲@ 提交于 2020-01-03 05:15:12
问题 I have a requirement that a user can select multiple dates in a date picker. How can I implement multiple date select functionality in an Angular Material date picker? I tried this through dateClass . But, after every date selection the date picker will be closed. Here's what I tried HTML code: <input matInput [matDatepicker]="picker" placeholder="Choose a date"> <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> <mat-datepicker [dateClass]="dateClass" #picker></mat

In Angular, is it possible to apply MatTooltip on an element that was created on runtime?

南楼画角 提交于 2020-01-03 04:28:06
问题 I'm using FullCalendar (angular version) and I wanted to add a glyphicon on the resources list that when hovered, shows angular's MatTooltip. The issue now is that using element.setAttribute('matTooltip') is not cutting it. It's getting converted to mattooltip which won't work. So I was thinking if there is a possible way of instantiating matTooltip on new HTMLDomElement let departmentInfoSpan = document.createElement('span'); departmentInfoSpan.setAttribute('matTooltip', 'sample tooltip');

How to filter out the data between a start and end date using filterPredicate in Angular Material Data Table?

北城余情 提交于 2020-01-03 03:27:04
问题 In my data table I have a Start date column and an end date column. And I need to filter out the data in the table between the start and end dates. And using this post , I was able to write the filter Predicate. But it only filters the exact start date and exact end date. The API returns the date in a string format like "2018-08-30". So, how to filter out the data between the start and end dates ? 回答1: First, you need to add the Range filter, or Range must in your query to get the result set

Angular Material Toolbar Color Distorted

拜拜、爱过 提交于 2020-01-03 02:50:15
问题 A Code pen that illustrates this problem can be found at http://cdpn.io/VKxEaZ I have been experiencing an issue with Angular Material in regards to the toolbar having distorted colors. Along the edges (where there is content) the toolbar is one shade of green while in the middle (where there is no content) the toolbar is a different shade of green. See the picture below: The code that produced this is as below. <md-toolbar> <div class="md-toolbar-tools"> <h2><span>Name of Web App</span></h2>

Unable to hide the navigation bar in login page in angular 2

烈酒焚心 提交于 2020-01-03 02:24:11
问题 I am trying to implement a sample app in Angular using Angular Material and Angular Flex Layout . I have implemented a navigation bar which i want to hide in login page and visible in all pages in the application. I have created a service with the name showmenu.service.ts where I have declared a variable and assigned as boolean value. Also defined two functions show() and hide() I am not getting any error, but I am unable to hide the navigation bar in my login page . Please access my sample

ionic app to ionic material or angular material

大城市里の小女人 提交于 2020-01-02 22:01:55
问题 Just want to know how can I upgrade my ionic + angularJS app to ionic material + angular or angular matrial + ionic app. I have a lot of code already written and do not want to change whole app. is there any way to inject material to existing ionic app? 回答1: It's pretty easy: https://github.com/zachsoft/Ionic-Material As you can read in here github.com/zachsoft/Ionic-Material#can-i-use-ionic-and-angular-material-together, it's much better to use Ionic Material than Angular Material for ionic.

ionic app to ionic material or angular material

帅比萌擦擦* 提交于 2020-01-02 22:01:34
问题 Just want to know how can I upgrade my ionic + angularJS app to ionic material + angular or angular matrial + ionic app. I have a lot of code already written and do not want to change whole app. is there any way to inject material to existing ionic app? 回答1: It's pretty easy: https://github.com/zachsoft/Ionic-Material As you can read in here github.com/zachsoft/Ionic-Material#can-i-use-ionic-and-angular-material-together, it's much better to use Ionic Material than Angular Material for ionic.

Redirect in a specified tab in another page from link Angular 6

痞子三分冷 提交于 2020-01-02 10:28:12
问题 I'm working with Angular 6.2 & Angular Material. I have a page with mat tabs (3 tabs). It is possible to redirect in this page but with the 3rd tab active? From clicking a link in the navbar. It looks like not possible, there isn't any solution for this on websites. 回答1: If you are using a mat-tab-group, there is an input property to specify the index of the active tab. @Input() selectedIndex: number | null => The index of the active tab. Refer the Official docs for mat tab groups 回答2: I