Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

different module templates #198

Closed
gruppjo opened this issue May 22, 2015 · 11 comments
Closed

different module templates #198

gruppjo opened this issue May 22, 2015 · 11 comments

Comments

@gruppjo
Copy link
Contributor

gruppjo commented May 22, 2015

@gruppjo gruppjo added this to the 1.2.0 milestone May 22, 2015
@gruppjo gruppjo changed the title implement extended example code like in ionic cli (side menu, tab nav) different module templates Jun 5, 2015
@anasmithiam
Copy link

I think this is an important issue to attract more people to use this generator. it would be easier to people not accustomed to organize the code into feature-modules if the generated code shows how get an ionic app with tabs or sidemenus and more than one feature-module.

related #157 #140

@ismusidhu
Copy link

+1
I had to saperately generate ionic app and then pick code bits from there.

@LunarDevelopment
Copy link

👍 Desperatley, I'm getting a bit lost now that I've made 'navigation', 'main' and 'about' modules.

Of course through research I'm aware I should have some kind of 'common' module for nav bar etc but its still a case of working blind for someone new to this generator and using more than one module in a project.

@gruppjo
Copy link
Contributor Author

gruppjo commented Jun 17, 2015

Hi @LunarDevelopment! When you're a beginner I'd recommend you only use one module for everything. We only use modules for very very large projects. That makes it easier at the beginning and you don't have to worry about wha is best put where. And that lets you stay focused on what's important! :)

Edit: I updated the README.md. It now mentions that modules are an advanced technique that is not necessary for most projects. https://github.com/mwaylabs/generator-m/tree/master#yo-mmodule---creates-a-new-module

@LunarDevelopment
Copy link

Solid advice that I'll take, Thankyou very much!

Lewis
On 17 Jun 2015 15:27, "Jonathan Grupp" [email protected] wrote:

Hi @LunarDevelopment https://github.com/LunarDevelopment! When you're a
beginner I'd recommend you only use one module for everything. We only use
modules for very large projects. That makes it easier at the beginning and
you don't have to worry about what you is best put where which lets you
stay focused on what's important! :)


Reply to this email directly or view it on GitHub
#198 (comment)
.

@gruppjo
Copy link
Contributor Author

gruppjo commented Jun 25, 2015

I created a repository showing the templates as we're going to implement them. Feedback welcome!
https://github.com/mwaylabs/generator-m-demo

Run on your machine:

  • clone
  • npm install && bower install
  • optionally run cordova prepare if you want to run it on a device
  • gulp watch
  • navigate to one of the 3 templates (see repository readme for more info)

This is how you'll be able to use this in the future:

  • run yo:m (for a new project) or type yo m:myModule (for a new module)
  • choose between: sidemenu, tabs and blank template

@gruppjo
Copy link
Contributor Author

gruppjo commented Jun 25, 2015

The implementation is in the master. Feedback still welcome!

@gruppjo gruppjo closed this as completed Jun 25, 2015
@LunarDevelopment
Copy link

I'm running latest generator-m and I'm not getting this,

I run yo m:module test sidemenu

and I get a standard module with no additional views or states beyond start.html etc.

@gruppjo
Copy link
Contributor Author

gruppjo commented Jul 1, 2015

That's because it hasn't been released yet. If you want to work with the most current (but unstable) version of the generator that includes this feature, you need to clone this repository and npm link it. However we're planning to release soon.

@LunarDevelopment
Copy link

Aha, that explains it.

Thank you for the fast response!

Lewis

@ronak-gitome
Copy link

Can anyone help me!
Just wanted to know...how to use same template from one module to another?
For Ex. - I created one module with side menu, now I want to create another module -blank, because menu is already in one module..So, now how to use that menu as common for the rest of modules I will create.

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

No branches or pull requests

5 participants