Tuesday, September 26, 2017

How to add element dynamically in angularjs without using directive?

First of all, I’m new in Angularjs and not good at English.

I tried to add <li> by using directive, and below link is completed result of my first purpose.

Add element using directive

Second is passing value from Controller to directive or from directive to Controller, known as two-way binding.

But in this step, I couldn’t figure out how to use @,= and ‘&’.

I guessed it’s because of using directive in directive.

In my original code, my modal is made of directive, so button directive seems cannot get value from Controller.

I’m sorry I cannot show you my own code because I don’t know how to make many directives in fiddle.

.

.

I wanna know there are any way to add element dynamically without using directive.

No matter what you suggested like link, doc, or something, it’ll be great helpful to me.

Just give a little attention please. Thank you. Have a nice day!

Source: AngularJS



from Angular Questions https://angularquestions.com/2017/09/26/how-to-add-element-dynamically-in-angularjs-without-using-directive/
via @lzomedia #developer #freelance #web

No comments:

Post a Comment