Use jQuery to make a NEW instance of angularJS array -


i working angular , jquery

i have div "a", pulling content via angular

<div class="a">    <p ng-repeat="banana in bananas">{{banana}}</p> </div> 

i have ul class "b"

<ul class="b">   <li>content 1</li>   <li>content 2</li>   <li>content 3</li> <ul> 

when of li inside "b" clicked insert li in .accordion

//this works fine     $(".b li").click(function () {    $(this).clone().appendto(".accordion");  }); 

the problem when want same thing div "a"... div "a" inserted on last appended li

jquery accordion div, empty,

<div class="accordion"> </div> 

and trying create new instance of div "a" everytime li clicked must inserted new child of accordion can work independently

class "a" must created within jquery, inserted

myvar = $("<div class="a"><p ng-repeat="banana in bananas">{{banana}}</p></div>");   $(".b li").click(function () {    $(this).clone().append(myvar).appendto(".accordion"); }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -