I am new to AngularJS and recently introduced it into my application. I am trying to re-write some of my existing jQuery code in my controllers, however, on one occasion, i am using:
jQuery:
if ($(window).width() < 700) {
$('.productsHeading').on('click', function() {
$(".productsBody").hide();
$(".aboutUsBody").show();
});
}
I can get around the .hide()
and .show()
using ng-hide="productsBody"
and ng-hide="aboutUsBody"
within my DIVs.. These are handled through a ng-click="productsheading()"
.. However, the issue i am facing is, how do i handle the:
if ($(window).width() < 700) {
In AngularJS? I am using AngularJS v1.1.5