Skip to content

editable not working in template #170

@dreambo8563

Description

@dreambo8563
import {Component, ViewChild, ElementRef} from "angular2/core";
import {Color}  from "color";
import {SearchBar} from "ui/search-bar";
import {TextField} from "ui/text-field";
import {Switch} from "ui/switch";
import {Slider} from "ui/slider";

@Component({
    selector: "my-app",
    template: `
<StackLayout orientation="vertical">
<TextField #text  style="color:red;" editable="false" keyboardType="email" hint="your name" secure="false"></TextField>

</StackLayout>
`,
    styleUrls: ["app.css"]
})
export class AppComponent {

    // value: Number;
    // @ViewChild('searchBar') ngSearchBar: ElementRef;

    constructor() {
//    returnKeyType="search"
    }

    ngAfterViewInit() {

    }



}

template not working, but working with ts this.nsText.editable = false;

Add more info: after a few test, I found if we set editable and keyboardType at the same time. the editable props will not work.

by the way, is there a way to change the color when the textfiled focused?(the line's color)

for tabView we can set selectedColor for the line. how to do that for textfield?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions