Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model with previus data not showing correctly #33

Open
drtobal opened this issue Mar 10, 2017 · 4 comments
Open

model with previus data not showing correctly #33

drtobal opened this issue Mar 10, 2017 · 4 comments

Comments

@drtobal
Copy link

drtobal commented Mar 10, 2017

Hi,

I am creating a form with only inputs of text, and is working ok. but when I put a model with data previusly loaded, the text int the input don't show correctly, but if I click the input, then the text is showed.

How can I fix this?

Thanks!!.

@drtobal
Copy link
Author

drtobal commented Mar 14, 2017

any help on this?

@Anthropic
Copy link
Member

@drtobal sure, but I can't debug code I can't see :)
You will need to provide a plunker to get help debugging something, I also need to know what version you are using of both asf and asfm. Also asfm has not been updated to work with the asf alpha yet, so if you are using the alpha that could be the issue.

@de-luca
Copy link

de-luca commented Jun 12, 2017

This dirty fix make it work on ASFM 1.0.0-alpha.1 with ASF 1.0.0-alpha.4 :

$rootScope.$on('sf-render-finished', (event, el) => {
    $timeout(() => {
        el[0].querySelectorAll('md-input-container').forEach((input) => {
            if (angular.element(input).scope().ngModel.$viewValue) {
                input.classList.add('md-input-has-value');
            }
        });
    });
});

@mnzaki
Copy link

mnzaki commented Jun 15, 2017

@de-luca note that using .scope() will not work if you disable debug info (which is recommended in production builds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants