EDIT Ok, guys thank you all. I now got that my approach was wrong and that jQuery and AngularJS architectures don't really bode well together. I will try to approach it with pure AngularJS way(the purpose of this was to learn Angular). You are a nice community.
I know that some people have asked something similar again, but I didn't find any solution. I am quite new in AngularJS(seems awesome btw), but I am a bit confused on how to do some basic stuff.
I want to click a button and load a div from another page. That div is populated from AngularJS MV.
My jQuery code
$('#nav li').click(function(){
var elemt = $(this).html().toLowerCase();
$('#main_descr').html('');
$('#dynamic').remove();
$('#main_descr').load( 'moar.php #'+elemt, function(){
//what should I do?
});
});
a portion of my "AngularJS moar.php"(for example this div is getting loaded)
<div id="skills" class="more_info" ng-controller="skillsList">
<h2>Skills</h2>
<section ng-repeat="skill in skills">
<h3>{{skill.title}}</h3>
<ul>
<li ng-repeat="partskill in skill.skillz">{{partskill.name}}</li>
</ul>
</section>
my controller(note that I haven't declared an app. I load )
function skillsList($scope) {
$scope.skills = [
{'title': 'Science & Engineering',
'skillz' : [
{'name' : 'Software engineering'},
{'name' : 'Operating Systems'},
{'name' : 'Bio - Informatics'},
{'name' : 'Algorithms'},
{'name' : 'Optimization'},
{'name' : 'RESTful services'},
{'name' : 'Digital Design'},
{'name' : 'Electronics'},
{'name' : 'Wireless Sensors'},
{'name' : 'OpNet'},
{'name' : 'Simulations'},
{'name' : 'Mathematics(applied, analysis etc.)'}
]},
{'title': 'Coding',
'skillz' : [
{'name' : 'Java'},
{'name' : 'Android'},
{'name' : 'C++'},
{'name' : 'C'},
{'name' : 'Python'},
{'name' : 'Javascript'},
{'name' : 'jQuery'},
{'name' : 'AngularJS'},
{'name' : 'PHP5'},
{'name' : 'SQL'},
{'name' : 'CSS3'},
{'name' : 'HTML5'},
{'name' : 'Matlab'},
{'name' : 'ns'}
]},
{'title': 'Languages',
'skillz' : [
{'name' : 'English', 'extra' : 'Proficient'},
{'name' : 'Greek', 'extra' : 'Native'},
{'name' : 'Swedish', 'extra' : 'Basic'}
]}
];
}
I would love some advice, please. Help the newbie
ng-click=""
?