Comments (14)
Great, thanks for noticing!
Working on a fix
from angular-material-design-lite.
Updated docs, thanks again!
Feel free to open a new issue
from angular-material-design-lite.
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.
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.
Will try I am using Meteor with Angular - it might take some time!
from angular-material-design-lite.
okay
from angular-material-design-lite.
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.
hmm I don't get what's the issue? When I enable componentHandler.upgradeAllRegistered() it works..
from angular-material-design-lite.
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.
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.
@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.
@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.
Can you show me a codepen with the new issue? Maybe the switches are not being dynamically injected anymore?
from angular-material-design-lite.
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)
- mdl-button-raised to be fusionned with mdl-button HOT 4
- ripple effect applied when button is disabled HOT 5
- material design ng-view issue HOT 3
- Angular mdl input type issue HOT 6
- how do i let it work in template.html when i use the ngRute HOT 2
- mdl-menu ul id="" and for="" Issue in angular HOT 2
- Layout Drawer question HOT 3
- Initial state of checkbox HOT 1
- Mdl tabs "is-active" class is not applied by [ngClass]. HOT 3
- convert to attribute directives: radio & checkboxes
- convert to attribute directive: buttons
- Angular 2.0 support ? HOT 1
- Npm support? HOT 8
- any progress soon? HOT 3
- ui-view button issue HOT 1
- [REQUEST] MDL Tooltips HOT 1
- componentHandler.upgradeAllRegistered() on ngView HOT 19
- Switch not responding to model change HOT 5
- mdl-text-field : keep <input> to conserve the possibility to use some attribut as "list" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-material-design-lite.