github.io 上的代码无法正确呈现
Code not rendering correctly on github.io
我正在尝试在 github.io 上的博客上添加一些代码。这是 jekyll 上的 pixyll 主题。
代码示例是
```
<!-- Add some model -->
<input type="text" ng-model="hello-model"></input>
<!-- And show that up -->
<h1>{{hello-model}}</h1>
```
但是,当它出现在博客上时。它显示时没有 {{ }}。
<!-- Add some model -->
<input type="text" ng-model="hello-model"></input>
<!-- And show that up -->
<h1></h1>
谁能帮我把 {{}} 添加回博客。
这是因为 AngularJS 和 Jekyll 都使用 {{ }}(分别是绑定和模板)。
您可以使用 ng-bind
解决您的问题。请参阅 here 以获取相应的文档。
本质上它看起来像
<h1 ng-bind="hello-model"></h1>
我正在尝试在 github.io 上的博客上添加一些代码。这是 jekyll 上的 pixyll 主题。
代码示例是
```
<!-- Add some model -->
<input type="text" ng-model="hello-model"></input>
<!-- And show that up -->
<h1>{{hello-model}}</h1>
```
但是,当它出现在博客上时。它显示时没有 {{ }}。
<!-- Add some model -->
<input type="text" ng-model="hello-model"></input>
<!-- And show that up -->
<h1></h1>
谁能帮我把 {{}} 添加回博客。
这是因为 AngularJS 和 Jekyll 都使用 {{ }}(分别是绑定和模板)。
您可以使用 ng-bind
解决您的问题。请参阅 here 以获取相应的文档。
本质上它看起来像
<h1 ng-bind="hello-model"></h1>