angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open jeffbcross opened this issue 10 years ago • 10 comments

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.

jeffbcross avatar May 18 '16 04:05 jeffbcross

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

drejohnson avatar May 23 '16 18:05 drejohnson

+1

david1983 avatar May 27 '16 13:05 david1983

+1

KenCorbettJr avatar May 27 '16 14:05 KenCorbettJr

+1

cbomkamp avatar May 28 '16 12:05 cbomkamp

+1

VledicFranco avatar May 30 '16 22:05 VledicFranco

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!

0x-r4bbit avatar May 30 '16 22:05 0x-r4bbit

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?

refrigerator avatar Jul 21 '16 18:07 refrigerator

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.

rlbarreto avatar Jul 28 '16 01:07 rlbarreto

Superseded by https://github.com/angular/angular-cli/issues/1371

filipesilva avatar Jul 28 '16 16:07 filipesilva

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.