javascript - Angular: Render externalized strings containing scope variables in the controller -


is possible render externalized strings (passed server in case) in controller?

my use case: i'm using angular-toastr alert service, , must pass message , title toastr object. tricky part when strings contain scope variables, e.g: stringfromserver = "something {{somevariable}} went wrong".

i know in http callback somevariable want render string before passing message alert service.

is possible, , best way?

assuming server can render string $scope.variable placeholder, $interpolate seems you're looking for.

please see documentation


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -