我使用以下代码在标题中包含搜索但无法根据长度
正确对齐所以,如果我在标题中添加一个新菜单,那么它应该自动调整可用空间。
现在,它出现在下面
<div>
<nav class="navbar-inverse" ng-class="::{'navbar':!isViewNative, 'is-native': isViewNative}"
role="navigation">
<div ng-show="::!isViewNative" class="navbar-header">
<a class="navbar-brand" href="#"><span>Test</span></a>
<a class="navbar-brand navbar-brand-logo"href="#">
<img ng-src="something" />
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#he-nav-bar">
<span class="sr-only">${Toggle navigation}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div sp-navbar-toggle="" class="collapse navbar-collapse navbar-right" id="he-nav-bar">
/**added search here**********/
<form method="get" action="?">
<input type="hidden" name="id" value="search"/>
<input type="hidden" name="t" value="{{data.searchType}}"/>
<div class="input-group input-group-{{::c.options.size}}">
<!-- uses ui.bootstrap.typeahead -->
<input name="q" type="text" placeholder="{{::c.options.title}}" ng-model="c.selectedState"
ng-model-options="{debounce: 250}" autocomplete="off"
uib-typeahead="item as item.label for item in c.getResults($viewValue)"
typeahead-focus-first="false"
typeahead-on-select="c.onSelect($item, $model, $label)"
typeahead-template-url="sp-typeahead.html" class="form-control input-typeahead">
<span class="input-group-btn">
<button name="search" type="submit" class="btn btn-{{::c.options.color}}">
<i ng-if="::c.options.glyph" class="fa fa-{{::c.options.glyph}}"></i>
</button>
</span>
</div>
</form>
<ul ng-if="" class="nav navbar-nav">
<li><a href ng-click="openLogin()">${Login}</a></li>
</ul>
<ul ng-if="" class="nav navbar-nav">
<li ng-if="><a href ng-click="openPopUp()">${Help}</a></li>
<li class="dropdown hidden-xs">
<ul class="dropdown-menu">
<li><a ng-href="">${menu}</a></li>
<li><a href="">${submenu}</a></li>
</ul>
</li>
<li class="visible-xs-block"><a ng-href=""><span class="navbar-avatar"><sn-avatar class="avatar-small-medium" /></span>${name}</a></li>
<li class="visible-xs-block"><a href="">${Logout}</a></li>
</ul>
</div>
</nav>
</div>
谢谢和问候, 克里希纳
答案 0 :(得分:0)
I think this will work for you