0
I’m using the Angularjs framework and need my tag to receive a dynamic class example:
<html lang="en" id="ng-app" ng-app="app" ng-class="app.title">
</html>
This app.title will receive a value from Mongo.
Can anyone tell me if this is possible? And if this way it is possible to return the class name knowing that I have a string in this field?
I don’t think anyone knows that answer. The attribute
ng-class
works in normal elements, but in HTML I do not know. Probably you will have to define the attributesng-app
,ng-controller
and only thenng-class
maybe it works, everyone on the taghtml
. Test. It’s the easiest way to find out.– Vinícius Gobbo A. de Oliveira