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

Organising template files in the same folder for all platforms #64

Closed
chriswep opened this issue May 9, 2016 · 4 comments
Closed

Organising template files in the same folder for all platforms #64

chriswep opened this issue May 9, 2016 · 4 comments

Comments

@chriswep
Copy link

chriswep commented May 9, 2016

I did some code changes here to show the idea of the (feature?) request.

Having all the template files side by side for one component would feel way more natural for me (and also more in the spirit of this seed, as far as i understand it).

This currently fails on runtime (iOS) with:
Error: File app/components/app/app.component.xml does not exist.
(However, the file does exist at this location in the nativescript folder.)

@NathanWalker
Copy link
Owner

Hi @metzc thanks, I will be bringing this change in soon however it will be based on this: https://github.com/NathanWalker/nativescript-ng2-magic which uses .tns.html suffix to handle it and it works with the Parse5DomAdaptor issue where .html is required with views but you can still use {N} xml just fine in the .tns.html files.
https://github.com/NathanWalker/nativescript-ng2-magic#how-to-create-nativescript-views

I'll commit this change once the rc.1 update is complete. Just waiting on @ocombe to update ng2-translate :)

@chriswep
Copy link
Author

nativescript-ng2-magic looks great! is the plan to fully merge it into the seed?

@NathanWalker
Copy link
Owner

I believe I will. I've been debating on whether I want to combine the decorator from magic with the one here. At any rate, this integration will be in by the end of the week.

NathanWalker added a commit that referenced this issue May 11, 2016
You can now create NativeScript view templates right beside your web
templates. Just suffix them with `.tns.html` and everything will work.
Also a symbolic link is created so you can make changes in either
folder `src/client` or `nativescript`. This also allows livesync to
work. See the new commands in the readme under ‘NativeScript App’
section.

closes #64
NathanWalker added a commit that referenced this issue May 11, 2016
You can now create NativeScript view templates right beside your web
templates. Just suffix them with `.tns.html` and everything will work.
Also a symbolic link is created so you can make changes in either
folder `src/client` or `nativescript`. This also allows livesync to
work. See the new commands in the readme under ‘NativeScript App’
section.

closes #64
@NathanWalker
Copy link
Owner

@metzc This is available on master now, see the new commands as well:
https://github.com/NathanWalker/angular2-seed-advanced#nativescript-app

This also creates a symbolic link between web src and {N} app so you can now make changes in either folder and they will be the same. Lastly, this makes livesync work with {N} dev workflow.
You will want to pull and run npm install again as the symbolic links are created as a postinstall step.

NathanWalker added a commit that referenced this issue May 11, 2016
You can now create NativeScript view templates right beside your web
templates. Just suffix them with `.tns.html` and everything will work.
Also a symbolic link is created so you can make changes in either
folder `src/client` or `nativescript`. This also allows livesync to
work. See the new commands in the readme under ‘NativeScript App’
section.

closes #64
NathanWalker added a commit that referenced this issue May 11, 2016
You can now create NativeScript view templates right beside your web
templates. Just suffix them with `.tns.html` and everything will work.
Also a symbolic link is created so you can make changes in either
folder `src/client` or `nativescript`. This also allows livesync to
work. See the new commands in the readme under ‘NativeScript App’
section.

closes #64
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

2 participants