angular js项目不起作用

时间:2015-05-05 21:54:29

标签: javascript jquery angularjs web

我正在开发一个带有角度js的小项目(ps:这是我第一次使用它)并且我被这个错误阻止了,我不明白为什么

    gulp.task('compass', function() {
      return gulp.src('sites/default/themes/lsl_theme/sass/**/*.scss')
      .pipe(compass({
        config_file: 'sites/default/themes/lsl_theme/config.rb',
        css: 'css',
        sass: 'scss'
      }))
      .pipe(gulp.dest('./sites/default/themes/lsl_theme/css'))
      .pipe(notify({
        message: 'Compass task complete.'
      }))
      .pipe(livereload());
   });

2 个答案:

答案 0 :(得分:2)

要修复错误,您需要将另一个对象添加到@graph数组中,它应该可以正常工作。然后将定义["@graph"][1]。问题是你的数组中只有一个项目。

"@graph": [ 
   { "@id": "person", "@type": "schema:Person" }, 
   {} 
]

答案 1 :(得分:1)

您的@graph数组长度只有1个元素,因此$scope.personld["@graph"][1]不存在且命令$scope.personld["@graph"][1]["schema:familyName"] = "";会引发错误。

相关问题