您好我正在使用angular與express並使用jade作爲模板引擎。 當我渲染一個部分是一個玉石模板渲染視圖看起來不像 當我不使用玉的部分渲染。引導按鈕間距在使用快遞渲染玉石模板後丟失
這個例子是;當在按鈕之間使用玉空間時會像附加圖像一樣丟失。
在這裏,我在做什麼;
index.jade
body
block content
div(class="container-fluid")
div(class="row")
div(class="col-sm-2 col-md-2 col-lg-2")
include ../public/app/views/sidebar/main.sidebar.jade
div(class="col-sm-10 col-md-10 col-lg-10")
div(ng-view class="row") ----> i am trying to render view here
editor.html
<div class="col-md-12">
<div class="container" style="width:inherit;">
<div class="panel">
<div class="panel-heading">
<button type="button" class="btn btn-success">
<span class="glyphicon glyphicon-flash"></span>Execute
</button>
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-floppy-disk text-primary"></span>Save
</button>
</div>
<div class="panel-body"> <div id="editor"></div> </div>
</div>
</div>
<div class="container" style="width:inherit;" ng-include src="'/app/partials/editor/result.grid.html'"></div>
</div>
當HTML渲染 看到按鍵之間,而且裏面的按鈕圖標和文字空間
不僅空間editor.jade
div(class="col-md-12" ng-controller="EditorCtrl")
div(class="container" style="width:inherit;")
div.panel
div(class="panel-heading clearfix")
button(type="button" class="btn btn-success")
span(class="glyphicon glyphicon-flash") Execute
button(type="button" class="btn btn-default")
span(class="glyphicon glyphicon-floppy-disk text-primary")
div.panel-body
div(id="editor")
div(class="container" style="width:inherit;")
和快速的應用程序。JS
app.get('/app/views/editor/editor.jade', function(req, res){
var name = req.params.name;
res.render('../public/app/views/editor/editor.jade');
});
我還觀察問題在玉石呈現爲部分其他組件
HTML
玉
你有沒有比較撕裂在這兩種情況下爲按鈕提供HTML?看到這可能會有幫助。 – isherwood
是的,我做了,他們看起來一樣(對我來說)。其實我認爲問題是在渲染過程中應用風格,但後來我再次思考並詢問;如果在渲染過程中出現問題,那麼無論如何渲染按鈕。順便說一句我把呈現HTML和玉的版本 – whb