Is there a way in AngularJs to replace a string?
I'm trying to do something like:
{{string.replace('some', 'thing')}}
Thanks!
your snippet works!
demo: http://plnkr.co/edit/yNuNeE5yO3rgKAYfGx48?p=preview
html
<body ng-app="app">
<div>
<div class="container" ng-controller="mainCtrl">
<p>
{{ name.replace('some', 'thing') }}
</p>
</div>
</div>
</body>
js
var app = angular.module('app', []);
app.controller('mainCtrl',function($scope) {
$scope.name = 'this is some';
}
);
the output is this is thing
