1.0.5 • Published 1 year ago

taggedjs-gateway v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

taggedjs-gateway

Creates the ability to use taggedjs within other frameworks such as React and Angular

Install

npm install taggedjs taggedjs-gateway

Use with Angular

import { Component } from "@angular/core"
import { loadTagGateway } from "taggedjs-gateway"
import { html } from "taggedjs"

const yourTagComponent = tag(({someNumber, another}) => {
  return html`<div>number:${someNumber} - another:${another}</div>`
})

@Component({
  selector: 'dump',
  template: `
    <!-- simple variable props only -->
    <div [attr.tag:id]="yourTag.id"
      [attr.someNumber]="value"
      [attr.another]="variable"
    ></div>
    
    <!-- OR -->

    <!-- complex variable props -->
    <div [attr.tag]="yourTag.id"
      [attr.props]="yourTag.props({ someNumber:value, another:variable })"
    ></div>
  `,
}) export class DumpComponent {
  yourTagId = loadTagGateway( yourTagComponent )
  
  // props
  value = 22
  variable = 'another'
}
1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago