I am building a Rails app but using AngularJS for bits of the front end.
Is it possible to store {{expressions}}
as a $scope.variable
value?
Code:
Here is the angular controller
// I am pulling data from the rails controller via the gon gem.
$scope.entertainmentTemplate = gon.active_entertainment_template.description;
Which translates to:
$scope.description = "{{productName}} is a great product and also has awesome {{additionalInfo}}. These are some more example words, blah blah..";
Defined variables in angular controller:
$scope.productName = "Test product";
$scope.additionalInfo = "test additional information";
My question is how do I render the above $scope.description
to the view so that it displays like so:
"Test product is a great product and also has awesome test additional information. These are some more example words, blah blah.."
Please let me know if any additional context is needed.
UPDATE 1:
Here is an image of the application to show context: