3.0.0 • Published 5 years ago

angularjs-morph v3.0.0

Weekly downloads
68
License
Apache-2.0
Repository
github
Last release
5 years ago

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
3.0.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago