Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs html中的等效jade文件是什么?_Angularjs_Pug - Fatal编程技术网

Angularjs html中的等效jade文件是什么?

Angularjs html中的等效jade文件是什么?,angularjs,pug,Angularjs,Pug,我必须将应用程序从jade迁移到HTML5(bootstrap3)。我看了文件。这很有用,但我没有找到我需要的所有信息。以下是完整的index.jade文件: html(lang='en', data-ng-app='angular-client-side-auth') head meta(charset='utf-8') title Angular Auth Example link(rel='stylesheet', href='/css/app.css') link(href="

我必须将应用程序从jade迁移到HTML5(bootstrap3)。我看了文件。这很有用,但我没有找到我需要的所有信息。以下是完整的index.jade文件:

html(lang='en', data-ng-app='angular-client-side-auth')
head
meta(charset='utf-8')
title Angular Auth Example
link(rel='stylesheet', href='/css/app.css')
link(href="/components/bootstrap/dist/css/bootstrap.min.css", rel="stylesheet")
link(href="/components/font-awesome/css/font-awesome.min.css", rel="stylesheet")
// This is needed because Facebook login redirects add #_=_ at the end of the URL
script(type="text/javascript").
if (window.location.href.indexOf('#_=_') > 0) {
window.location = window.location.href.replace(/#.*/, '');
}
body(data-ng-cloak)
.navbar(data-ng-controller="NavCtrl")
.navbar-inner
.container-fluid
ul.nav.nav-tabs
li(data-access-level='accessLevels.anon', active-nav)
a(href='/login') Log in
li(data-access-level='accessLevels.anon', active-nav)
a(href='/register') Register
li(data-access-level='accessLevels.user', active-nav)
a(href='/') Home
li(data-access-level='accessLevels.user', active-nav='nestedTop')
a(href='/private') Private
li(data-access-level='accessLevels.admin', active-nav)
a(href='/admin') Admin
li(data-access-level='accessLevels.user')
a(href="", data-ng-click="logout()")
| Log out
div#userInfo.pull-right(data-access-level='accessLevels.user')
| Welcome 
strong {{ user.username }} 
span.label(data-ng-class='{"label-info": user.role.title == userRoles.user.title, "label-success": user.role.title == userRoles.admin.title}') {{ user.role.title }}
.container(data-ui-view)
#alertBox.alert.alert-danger(data-ng-show="error")
button(type="button", class="close", data-ng-click="error = null;") ×
strong Oh no! 
span(data-ng-bind="error")
script(src='/components/angular/angular.min.js')
script(src='/components/angular-cookies/angular-cookies.min.js')
script(src='/components/angular-ui-router/release/angular-ui-router.min.js')
script(src='/js/routingConfig.js')
script(src='/js/app.js')
script(src='/js/services.js')
script(src='/js/controllers.js')
script(src='/js/filters.js')
script(src='/js/directives.js')
// Partial views... Load up front to make transitions smoother
script(type="text/ng-template", id="404")
include partials/404
script(type="text/ng-template", id="admin")
include partials/admin
script(type="text/ng-template", id="home")
include partials/home
script(type="text/ng-template", id="login")
include partials/login
script(type="text/ng-template", id="private/layout")
include partials/private/layout
script(type="text/ng-template", id="private/home")
include partials/private/home
script(type="text/ng-template", id="private/nested")
include partials/private/nested
script(type="text/ng-template", id="private/nestedAdmin")
include partials/private/nestedAdmin
script(type="text/ng-template", id="register")
include partials/register
以下两个标记的等效html/js是什么:

  • li(数据访问级别='accessLevels.anon',活动导航) a(href='/login')登录
  • 脚本(type=“text/ng template”,id=“404”) 包括部分/404

  • 感谢您的帮助。

    1=如果用户未通过身份验证(accessLevels.anon),则激活(显示)导航栏上的登录链接

    2) 显示位于partials文件夹中的404错误页

    您可以在此处查看-

    一,

  • 二,

    …'包含部分html“。。。
    
    为什么不编译它呢?谢谢Ilan Frumer。这是我第一次和杰德一起工作。我编译了它,得到了等价的html。
    <li data-access-level="accessLevels.anon" active-nav> </li><a href="/login">Log in</a>
    
    <script type="text/ng-template" id="404">  ... 'included partial html' ... </script>