Comments (2)
type is an attribute to material-input and cannot be changed dynamically. This is because it is used in selectors for certain inputs which are more complicated such as number, and percent.
Since it is an attribute it can't be set using a binding.
from angular_components_example.
Copying @TedSander's suggesting from a duplicate request here:
@Directive(selector: 'material-input[showPassword]')
class MaterialInputShowPasswordDirective {
MaterialInputComponent input;
MaterialInputShowPasswordDirective(this.input);
@Input()
set showPassword(bool unhide) {
input.type = unhide ? 'text' : 'password';
}
}
from angular_components_example.
Related Issues (20)
- How can the material-expansionpanel-set work with sub componet? HOT 4
- Can't pub get HOT 1
- Stack Overflow when 'pub build' HOT 3
- material input autocomplete HOT 1
- Material Tab - Dynamic Issues HOT 1
- Material Tab - ngIf Side Effects HOT 1
- Update icons list link HOT 1
- The Input "Auto SelectAll" example is not working on Safari 11.0 HOT 2
- Unable to build under Win10 HOT 3
- Add instructions on how to build / run HOT 1
- Use new analytics tracking code
- Would be nice to give instructions for the release build HOT 3
- Investigating: Weird build error when trying to cleanup imports HOT 9
- Material popup doesn't work on iPad 2017 Chrome 64 HOT 2
- Is there a way to reset material input state? HOT 3
- Deployed app contains `*.map` files HOT 17
- material-yes-button-text-color mixin don't work with stepper component HOT 1
- Example missing for `<reorder-list>` component HOT 4
- custom tooltipShowDelay 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_components_example.