1.0.15 • Published 5 years ago

nger-dom v1.0.15

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

5 years ago

1.0.14

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.6

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago