1.0.15 • Published 6 years ago

nger-dom v1.0.15

Weekly downloads
15
License
ISC
Repository
github
Last release
6 years ago

nger-rx-dom

基于rx的dom系统

component->subject->attribute

  • [] 组件input变更,通知dom属性或内容变更
  • [] 属性或内容变更,通知component变更

text node

@Component({
    selector: `nger-demo`,
    // (that: NgerDemoComponent)=>h(that.title)
    template: `{{title}}`
})
export class NgerDemoComponent{
    static template = ()=>h();
    title: string;
    constructor(public elementRef: ElementRef){}
}

divNode

@Component({
    selector: `nger-demo`,
    template: `{{title}}`
})
export class NgerDemoComponent{
    title: Subject = new Subject();
    constructor(public elementRef: ElementRef){
        this.title.subscribe(res=>{
            this.elementRef.nativeElement.text = res;
        })
    }
}
1.0.15

6 years ago

1.0.14

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago