Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular2 integration. How to load templates? #174

Open
boblgum opened this issue Jun 6, 2016 · 0 comments
Open

Angular2 integration. How to load templates? #174

boblgum opened this issue Jun 6, 2016 · 0 comments

Comments

@boblgum
Copy link

boblgum commented Jun 6, 2016

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'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant