These are chat archives for angular/material

14th
Sep 2016
Tom Matheussen
@Tommatheussen
Sep 14 2016 08:17
How would one go about making a panel with a list inside, so that the panel’s width changes to the list’s width? Right now scrolling up and down through the list gradually increases the size of the list until it fits
Aleksandar B.
@aleksandar-b
Sep 14 2016 08:41

I am getting this error ng-model for md-datepicker must be a Date instanceI am using moment...But when I turn it to Date instance I get infinite digest.

in view

<md-datepicker ng-model="Model.currentContact.getSetIncorporated" ng-model-options="{ getterSetter: true }" md-placeholder="Enter date"></md-datepicker>

in model of currentContact

Contact.prototype.getSetIncorporated = function(date) {
        if (arguments.length) {
            this.company.information.incorporatedObject = date;
            this.company.information.incorporated = moment.utc(date).format('X');
        }
        if (!this.company.information.incorporatedObject) {
            if (this.company.information.incorporated !== '') {
                this.company.information.incorporatedObject = moment.utc(this.company.information.incorporated, 'X').toDate();
            } else {
                this.company.information.incorporatedObject = null;
            }}
        return this.company.information.incorporatedObject;
    }
tnx!
Manoj888
@Manoj888
Sep 14 2016 09:53
hi
anyone tell me about how to make a route from one tab to other tab when we click a button in tab1 then it should move to tab2
Tom Matheussen
@Tommatheussen
Sep 14 2016 09:56
are you using mdNavBar?
Manoj888
@Manoj888
Sep 14 2016 09:57
yes
Tom Matheussen
@Tommatheussen
Sep 14 2016 09:57
then you should be able to use ng-href or ui-sref I believe
Manoj888
@Manoj888
Sep 14 2016 09:58
if u dont mind can u send me example for that
Tom Matheussen
@Tommatheussen
Sep 14 2016 10:00
<a ui-sref=“page2”>Go To Page 2</a>
Where you would a tab page called page2
Manoj888
@Manoj888
Sep 14 2016 10:06
how to share image here
Tom Matheussen
@Tommatheussen
Sep 14 2016 10:14
juust print screen and drag/drop should work
Manoj888
@Manoj888
Sep 14 2016 10:16
Screenshot (3).png
in the image when i click red(proceed) button it should move to contact details tab
Manoj888
@Manoj888
Sep 14 2016 10:30
tom can you help me with this
Tom Matheussen
@Tommatheussen
Sep 14 2016 10:46
well, can you wrap the button with the <a> tag?