Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.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
Javascript jade模板中的脚本标记未生成带角度的结束标记_Javascript_Angularjs_Pug - Fatal编程技术网

Javascript jade模板中的脚本标记未生成带角度的结束标记

Javascript jade模板中的脚本标记未生成带角度的结束标记,javascript,angularjs,pug,Javascript,Angularjs,Pug,我正在翻阅《卑鄙小人》一书,在第8章第2节遇到了麻烦。出版商的论坛帮不了什么忙 希望有人能给我一些启示,因为我不知道为什么它不能像书中所说的那样工作 我相信问题可能与我使用的视图有关 doctype html html(ng-app='loc8rApp') head meta(name='viewport', content='width=device-width, initial-scale=1.0') title= title

我正在翻阅《卑鄙小人》一书,在第8章第2节遇到了麻烦。出版商的论坛帮不了什么忙

希望有人能给我一些启示,因为我不知道为什么它不能像书中所说的那样工作

我相信问题可能与我使用的视图有关

    doctype html
    html(ng-app='loc8rApp')
      head
        meta(name='viewport', content='width=device-width, initial-scale=1.0')
        title= title
        link(rel='stylesheet', href='/bootstrap/css/amelia.bootstrap.css')
        link(rel='stylesheet', href='/stylesheets/style.css')
      body
       .navbar.navbar-default.navbar-fixed-top
          .container
            .navbar-header
              a.navbar-brand(href='/') Loc8r
              button.navbar-toggle(type='button', data-toggle='collapse', data-target='#navbar-main')
                span.icon-bar
                span.icon-bar
                span.icon-bar
            #navbar-main.navbar-collapse.collapse
              ul.nav.navbar-nav
                li
                  a(href='/about/') About

        .container
          block content

          footer
            .row
              .col-xs-12
                small © Simon Holmes 2014

        script(src='/angular/angular.js')
        script(src='/angular/loc8rApp.js')
        script(src='/javascripts/jquery-1.11.1.min.js')
        script(src='/bootstrap/js/bootstrap.min.js')
        script(src='/javascripts/validation.js')
当我加载页面时,它会生成以下html:

    <script src="/angular/angular.js"><script src="/angular/loc8rApp.js"></script>
    <script src="/javascripts/jquery-1.11.1.min.js"></script>
    <script src="/bootstrap/js/bootstrap.min.js"></script>
    <script src="/javascripts/validation.js"></script>
为了防止出现角度控制器文件(loc8rApp.js)的问题,这里有:

    angular.module('loc8rApp', []);

    var locationListCtrl = function ($scope) {
        $scope.data = {
            locations: [{
              //location data in here...
            }]
        };
    };

    var ratingStars = function() {
      // other code in here...
    };

    angular
        .module('loc8rApp')
        .controller('locationListCtrl', locationListCtrl)
        .filter('formatDistance', formatDistance)
        .directive('ratingStars', ratingStars);
提前感谢所有回应的人!=)

在模板文件中

车身下的线(第9排)间距不正确

与此相反:

    body
     .navbar.navbar-default.navbar-fixed-top
应该是这样的:

    body
      .navbar.navbar-default.navbar-fixed-top
这个错误出现在github chapter-08 branch repository的书中,我克隆了这本书,并用它来处理本章中所教的代码。我现在已经提交了一个拉请求来修复这个问题,希望它不会影响太多其他人

公共关系可在此处找到:

    body
      .navbar.navbar-default.navbar-fixed-top