Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

re-structurize demos #51

Merged
merged 1 commit into from
May 15, 2013
Merged

re-structurize demos #51

merged 1 commit into from
May 15, 2013

Conversation

DWand
Copy link
Member

@DWand DWand commented May 15, 2013

A proposal for a demos structure.

  • demo files are moved to the demo directory
  • js files moved to the demo/js directory
  • localization files moved to the demo/l10n directory
  • fixed Grunt.js and .gitignore according to the new structure

A list of demos is not complete. There are some new demos and
some rewritten old demos.

A proposal for a demos structure.
* demo files are moved to the demo directory
* js files moved to the demo/js directory
* localization files moved to the demo/l10n directory
* fixed Grunt.js and .gitignore according to the new structure

A list of demos is not complete. There are some new demos and
some rewritten old demos.
@DWand DWand mentioned this pull request May 15, 2013
0x-r4bbit added a commit that referenced this pull request May 15, 2013
@0x-r4bbit 0x-r4bbit merged commit 62139cf into angular-translate:canary May 15, 2013
@DWand
Copy link
Member Author

DWand commented May 16, 2013

c8c31de

@0x-r4bbit
Copy link
Member

?

@DWand
Copy link
Member Author

DWand commented May 16, 2013

I don't know is it necessary to show in demos how to use a loader with a url parameter. Let it lie down here. Maybe, it will be useful someday. Maybe, not )

@0x-r4bbit
Copy link
Member

@DWand If you have another demo which isn't covered yet, feel free to add it :)

@DWand
Copy link
Member Author

DWand commented May 16, 2013

@PascalPrecht here it is #54.
This is my first experience with Node.js. Maybe, there are some much more elegant ways to start the server to handle URLs.

@knalli
Copy link
Member

knalli commented May 16, 2013

We have already a server for such purpose.

If you start grunt serverit will invoke a small express server. After start just open open localhost:3005/demo in your browser.. it even includes an index view!

In case you really need to use NodeJS, we can apply an additional server.js right into this.

@DWand
Copy link
Member Author

DWand commented May 16, 2013

@knalli, it's not necessary a NodeJS. It might be anything, which can handle a GET request and send back a correct response. I know, that there is server provided by grunt (or something like this), but I don't know how to use it )) I usually work with PHP on the server side. It would be great (or, at least, interesting), if you can show how to handle this situation.

@knalli
Copy link
Member

knalli commented May 16, 2013

If you only need static files served by a server (i.e. for XHRs), just place the files in the corresponding demo folder. You can fetch them with localhost:3005/demo/<yourdemo>. Easy.

For routing, you can base your stuff on my #55.

@DWand
Copy link
Member Author

DWand commented May 16, 2013

Static files are working pretty good even without server :)) But in 9 example we use a registerLoader with URL. And a module requests for translations like: [given_url]?lang=[langCode]. So, that page (which is requested) would to understand this GET parameter and handle it.
Thanks 👍 . I'll try to understand how to use it tomorrow.

@knalli
Copy link
Member

knalli commented May 16, 2013

The routes (you have already made them) are stored in demo/server_routes. But I just notice the open PR #54 which contains a server, too.

@DWand
Copy link
Member Author

DWand commented May 17, 2013

#54 is updated

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants