Angular-cli: feat(mobile): support templateUrl and styleUrls with App Shell prerender

Created on 18 May 2016  路  10Comments  路  Source: angular/angular-cli

Right now, apps built with the --mobile flag require that any directives included in the pre-rendered App Shell only use inline templates and styles. This is due to a combination of broccoli trees, module.id, and universal not looking in the right place to get templates. Because of Broccoli's symlinking (I think), when the App Shell plugin is compiling the root component, the module.id is resolving to a path within the typescript plugin's tree, which only contains JS files (not the component's html and css files).

A solution should be implemented to make it simple to use templateUrl and styleUrls with App Shell components.

easy (hours) 2 (required)

Most helpful comment

Please stop +1'ing this issue and use GitHub's reaction feature instead (Click the smiley in the top right corner of a comment to add a reaction)

Thanks!

All 10 comments

It seemsstyleUrls works with lazy routes for --mobile apps. It would be super useful to able to use templateUrl and styleUrls.

+1

+1

+1

+1

Please stop +1'ing this issue and use GitHub's reaction feature instead (Click the smiley in the top right corner of a comment to add a reaction)

Thanks!

Hey, is anyone working on this? Would be super useful!

In the meantime, how can I have fully separate components for the App Shell and the dynamic app so that I can use templateUrl in the dynamic parts of the app?

Alternatively, how can I disable the App Shell for now so I can develop the rest of the app without build errors?

I am getting this error with the template app generated on
ng new appName --mobile
When I do ng serve I get the same error. Don't have any templateUrl or styleUrl yet.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rwillmer picture rwillmer  路  3Comments

jmurphzyo picture jmurphzyo  路  3Comments

hartjo picture hartjo  路  3Comments

IngvarKofoed picture IngvarKofoed  路  3Comments

hareeshav picture hareeshav  路  3Comments