Coder Social home page Coder Social logo

Comments (14)

jadjoubran avatar jadjoubran commented on May 27, 2024

Great, thanks for noticing!
Working on a fix

from angular-material-design-lite.

jadjoubran avatar jadjoubran commented on May 27, 2024

Updated docs, thanks again!

Feel free to open a new issue

from angular-material-design-lite.

6gsaifulislam avatar 6gsaifulislam commented on May 27, 2024

Out of interest - have you tried the radio button within a template - with me it will accept the selected value but not show the unselected I think it has something to do with componentHandler.upgradeAllRegistered() but putting that in makes no difference.

from angular-material-design-lite.

jadjoubran avatar jadjoubran commented on May 27, 2024

Can you provide a working plnkr or codepen?
Actually it would be great if you can open a new issue so that it would be helpful for other people

from angular-material-design-lite.

6gsaifulislam avatar 6gsaifulislam commented on May 27, 2024

Will try I am using Meteor with Angular - it might take some time!

from angular-material-design-lite.

jadjoubran avatar jadjoubran commented on May 27, 2024

okay

from angular-material-design-lite.

6gsaifulislam avatar 6gsaifulislam commented on May 27, 2024

Sorry can't get the template error reproduced - I think it is because codepen is reading the template whereas I would use a separate file (don't know how to do that in codepen).
Anyway here is the codepen http://codepen.io/anon/pen/NqeXGB it shows the issue with componentHandler.upgradeAllRegistered(). If you don't include it in the link function the buttons are not styled. The issue is that the componentHandler does not want to be in the link function as it would be called for every item used

from angular-material-design-lite.

jadjoubran avatar jadjoubran commented on May 27, 2024

hmm I don't get what's the issue? When I enable componentHandler.upgradeAllRegistered() it works..

from angular-material-design-lite.

6gsaifulislam avatar 6gsaifulislam commented on May 27, 2024

Its an issue I keep running into:
The problem is that when calling componentHandler.upgradeAllRegistered() it will not apply to item which are hidden by ng-if.
To me three are three solutions - 1) do not use ng-if and use ng-show or ng-hide instead 2) call the code in the link function or 3) call the code in the controller whenever the value for ng-if changes to true.
I do not like option 1 as it code slow things down - ok for small projects but on a large page?
Option 2 - Using the link function could call the same code over and over again.
Option 3 - could become difficult to keep track off.

Perhaps it's just me I tend to use ng-if a lot!

from angular-material-design-lite.

jadjoubran avatar jadjoubran commented on May 27, 2024

This is the issue that we're trying to solve in issue #4.. using ng-if is totally fine
I'm hoping for a fix soon
it's something that angular-material-design-lite should do out of the box..

from angular-material-design-lite.

jadjoubran avatar jadjoubran commented on May 27, 2024

@JohnAReid I've got a fix for you, checkout the new documentation and issue #4 and let me know what you think.

from angular-material-design-lite.

rr19 avatar rr19 commented on May 27, 2024

@jadjoubran Hi - had a play with it with mixed results - it seems to pick up the formatting but not sure about the js code. Material lite seems to have changed over the past few days - md switch seems to work now without the upgrade code. I stopped using the check box as it would not work correctly for me.

from angular-material-design-lite.

jadjoubran avatar jadjoubran commented on May 27, 2024

Can you show me a codepen with the new issue? Maybe the switches are not being dynamically injected anymore?

from angular-material-design-lite.

rr19 avatar rr19 commented on May 27, 2024

Sorry the codepen I used before often did not reproduce the errors the encountered. I know before last week I had to use the upgrade js code otherwise they were being shown as a un-styled check box.

Generally I am very happy with MDL - but then again I only use the button, menu and tab control.

from angular-material-design-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.