Can anyone help me figure out why the width of a div isn't being set dynamically using AngularJS?
<ul id="contents">
<li ng-repeat="content in contents">
<div class="content_right custom_width">
<div class="title">{{content.title}}</div>
</div>
</li>
</ul>
I have the following directive set up:
myApp.directive("custom_width", function() {
return {
restrict:"C",
link: function(scope, element, attrs) {
element.css("width", 400);
}
}
});
No errors are showing up and the console.log I added doesn't seem to be working. Any ideas on what could be causing this issue?
Thank you for your assistance.