What is the best way to conditionally apply attributes in AngularJS?
I need to be able to add for example “contenteditable” to elements, based on a boolean variable on scope. Example use: <h1 attrs=”{‘contenteditable=\”true\”‘: editMode}”>{{content.title}}</h1> Would result in contenteditable=true being added to the element if $scope.editMode was set to true. Is there some easy way to implement this ng-class like attribute behavior? I’m considering writing a … Read more