Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import {Component, View, bootstrap} from 'angular2/angular2';
  2.  
  3. @Component({
  4. selector: 'my-app'
  5. })
  6. @View({
  7. template: '<h1>Hello {{ name }}</h1>'
  8. })
  9. // Component controller
  10. class MyAppComponent {
  11. name: string;
  12. constructor() {
  13. this.name = 'Alice';
  14. }
  15. }
  16.  
  17. bootstrap(MyAppComponent);
  18.  
  19. var gulp = require('gulp');
  20. var babel = require('gulp-babel');
  21.  
  22. gulp.task('default', function () {
  23. return gulp.src('App.es6')
  24. .pipe(babel())
  25. .pipe(gulp.dest('dist'));
  26. });
  27.  
  28. {
  29. "stage": 1
  30. }
  31.  
  32. {
  33. "presets": ["stage-1"]
  34. }
  35.  
  36. {
  37. "presets": ["es2015"],
  38. "plugins": ["transform-decorators-legacy"]
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement