我的flash消息代码如下
<div class="flash-message" ng-if="flash">
<div class="{{'alert alert-' + flash.type}}" ng-bind="flash.message">
</div>
现在我正在使用
FlashService.Success('You have blocked this User');
我想让我的上述消息动态,我现在已经通过了静态。
我的节点api现在返回此消息
{
"data": {
"status": "1",
"msg": "You have blocked the user"
}
}
将结果传递给函数回调。
{
"data": {
"status": "1",
"msg": "You have blocked the user"
}
}
下面的代码使flash消息动态化。
FlashService.Success(result.data.msg);