This generator are using Angular2, Angular Component Router, Bootstrap v4(alpha) and Express on Node.js. Instead of MongoDB, it will use the lighter TingoDB.
Angular we have emphasized the development life cycle. It supports the next thing for that.
- Unit Test(unfinished)
- End-to-End Test
- Documentation(unfinished)
- Coverage(unfinished)
- Metric(unfinished)
Install: npm install -g generator-angular2-eggs
Make a new directory and cd
into it:
mkdir [app-name] && cd $_
yo angular2-eggs
Run the following command at the time of development:
npm run build
Although still some warning comes out, never mind :)
Available generators:
- yo angular2-eggs:components [name] [name(option)]
- yo angular2-eggs:attributes [name] [name(option)]
- yo angular2-eggs:service [name]
- yo angular2-eggs:server [name]
Case yo angular2-eggs:components appComp
make file
app/components/appcomp/appcomp.ts
app/components/appcomp/appcomp.html
test/components/appcomp/appcomp.spec.ts
component file
@Component({
selector: 'app-comp',
templateUrl: 'components/appcomp/appcomp.html'
})
export class AppCompComponent { }
Case yo angular2-eggs:components appComp subComp
make file
app/components/appcomp/appcomp.subcomp.ts
app/components/appcomp/appcomp.subcomp.html
test/components/appcomp/appcomp.subcomp.spec.ts
component file
@Component({
selector: 'sub-comp',
templateUrl: 'components/appcomp/appcomp.subcomp.html'
})
export class SubCompComponent { }
Case yo angular2-eggs:attribute appComp
make file
app/components/appcomp/appcomp.ts
app/components/appcomp/appcomp.html
test/components/appcomp/appcomp.spec.ts
component file
@Component({
selector: '[appComp]',
templateUrl: 'components/appcomp/appcomp.html'
})
export class AppCompComponent { }
Case yo angular2-eggs:attribute appComp subComp
make file
app/components/appcomp/appcomp.subcomp.ts
app/components/appcomp/appcomp.subcomp.html
test/components/appcomp/appcomp.subcomp.spec.ts
component file
@Component({
selector: '[subComp]',
templateUrl: 'components/appcomp/appcomp.subcomp.html'
})
export class SubCompComponent { }