1.0.15 • Published 7 years ago

nger-dom v1.0.15

Weekly downloads
15
License
ISC
Repository
github
Last release
7 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

7 years ago

1.0.14

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.6

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago