angularjs-morph

3.0.0 • Public • Published

angularjs-morph

npm version npm

sometimes the type of component you want to render will change depending on some input. this is a component that morphs in a specified component.

install

npm install angularjs-morph

usage

angular.module('myApp', ['angularjs-morph'])
 
<morph-into tag="a" attrs="{ title: 'DuckDuckGo', href: 'https://duckduckgo.com' }">
  Search
</morph-into>

api

tag=

string. a tag name.

attrs=

object. every value will be assigned to an attribute of the key's name

text

any text added inside the element will be rendered as the inner text of the morphed component.

example

see example on netlify

or run it yourself:

git clone https://github.com/kareniel/angularjs-morph
cd angularjs-morph
npm install
npm start

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.00
2.0.10
2.0.00
1.0.20
1.0.10
1.0.01

Package Sidebar

Install

npm i angularjs-morph

Weekly Downloads

1

Version

3.0.0

License

Apache-2.0

Unpacked Size

16.2 kB

Total Files

9

Last publish

Collaborators

  • kareniel