Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Compiling material directives on the fly: md-input-has-value attribute not set #3017

@warpdesign

Description

@warpdesign

I'm trying to dynamically compile material directives. It works, but for some reason, doesn't get the md-input-has-value attribute set, even though my inputs have a value set.

Maybe I'm doing something wrong ?

Here is an example:

$('<div id="foo"><md-input-container><label for="myInput">Plop</label><input id="myInput" name="myInput" value="48" type="text"/></md-input-container></div>').appendTo('body');

scope = $rootScope.$new();
$compile($('#foo').contents())(scope);

My input correctly gets the material styles, but since the md-input-has-value attribute isn't set, the value isn't displayed unless the input gets the focus.

Maybe I am missing something ?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions