我使用离子框架开发移动应用程序.我现在专注于Android开发.我想制作离子框架的导航栏,如下图所示.

它有一个名为ion-view和属性的标签 title
<ion-view title='TITLE'>
Run Code Online (Sandbox Code Playgroud)
现在导航栏看起来像下面的图像

如何在导航栏中添加图像?
我想在某些条件下使用str_replace.我正在开发一个应用程序,它从文本区域输入一个文本块并将其输出为1行.只要满足" end of line"或" space + with end of line",字符串就会替换为<br>
我现在已经找到了解决方案,无论何时end of line满足,字符串都被替换为<br>.但是如果用户输入一个space之前end of line,我需要在更换EOL之前摆脱那个空间<br>.
我的代码
$refresheddata = str_replace("\n", '<br>', $data);
Run Code Online (Sandbox Code Playgroud)
样本输入
This is the first line with a space at the end
This is the second line which donot have a space at the end
Run Code Online (Sandbox Code Playgroud)
输出我的代码
This is the first line with a space at the end <br>This is the second line which donot have a …Run Code Online (Sandbox Code Playgroud)