generator-grunt-symfony icon indicating copy to clipboard operation
generator-grunt-symfony copied to clipboard

Angular2 integration. How to load templates?

Open boblgum opened this issue 8 years ago • 0 comments

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'
};

boblgum avatar Jun 06 '16 16:06 boblgum