Web Demo Mobile Demo Angular Demo Vue Demo React Demo

密码框 PasswordBox

源代码
import { Component } from '@angular/core';

@Component({
	selector: 'app-root',
	template: `
		<h2>Basic PasswordBox</h2>
		<div style="margin-bottom:20px">
			<eui-textbox [(ngModel)]="username" placeholder="Username" iconCls="icon-man"></eui-textbox>
		</div>
		<div style="margin-bottom:20px">
			<eui-passwordbox [(ngModel)]="password" placeholder="Password"></eui-passwordbox>
		</div>
		<p *ngIf="username">Username: {{username}}</p>
		<p *ngIf="password">Password: {{password}}</p>
	`
})
export class AppComponent {
	username = null;
	password = null;

	onValueChange(event){
		console.log(event)
	}
}
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { EasyUIModule } from 'easyui/easyui/easyui.module';


import { AppComponent }   from './app.component';

@NgModule({
  bootstrap: [
    AppComponent
  ],
  declarations: [
    AppComponent
  ],
  imports: [
    FormsModule,
    BrowserModule,
    HttpModule,
    EasyUIModule
  ]
})
export class AppModule { }

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';

enableProdMode();

platformBrowserDynamic().bootstrapModule(AppModule);