bezoerb / generator-grunt-symfony

[DEPRECATED] Yeoman generator that scaffolds out a Symfony PHP app including Browsersync, various CSS preprocessors, RequireJS, jspm, webpack and Service Worker
33 stars 5 forks source link

Angular2 integration. How to load templates? #174

Open boblgum opened 8 years ago

boblgum commented 8 years ago

I was able to integrate angular2 (with TypeScript). But how can i load templates in "angular-way"?

app/Resources/views/controller/default/index.html.twig

{% extends 'base.html.twig' %}
{% block body %}
    <app>Loading...</app>
{% endblock %}

this works partially (fails on loading sub-components of cause)

@Component({
  selector: 'app',
  template: '<app-toolbar></app-toolbar><app-navbar></app-navbar>',
  ...
})

this fails

@Component({
  selector: 'app',
  templateUrl: 'app.component.html',
  ...
})

am i missing something in configuration?

UPDATE It looks like a missing path configuration in Gruntfile.js

var paths = {
    app: 'app/Resources/public',
    dist: 'web'
};