These are chat archives for angular/material

17th
Mar 2016
爱因斯唐
@forfuns
Mar 17 2016 08:20
hello
hello all , anyone here ?
I set the textarea attribute rows=5,but when I first load the page just one line on there
@siteshackinc hello
are you online ?
Brian Veltman
@brianveltman
Mar 17 2016 09:21
Hello, I’m new to Angular and I’m wondering how the app structure is set up. I’ve build applications in PHP where each ‘feature’ has it’s own file with it’s objects. But I don’t feel comfortable to create a new file for each factory and then include it in the index.html. What are your suggestions?
Andrei Nemes
@simplysh
Mar 17 2016 09:24
that's exactly what you should do
if you don't like adding them manually there are a lot of grunt/gulp modules to do it for you
Brian Veltman
@brianveltman
Mar 17 2016 09:25
It’s not about adding it manually. Generally it does not feel right to me to include a dozen of controllers, services and factories. But if that’s the way to go, I should get used to it ;-)
Thanks, will take a look at it.
Andrei Nemes
@simplysh
Mar 17 2016 09:26
it's generally considered better because individual bits of code are easier to test and maintain
also, when you get an error you can pinpoint it easier
because it occured in controller.js not in myapp.js line 2019 :)
Brian Veltman
@brianveltman
Mar 17 2016 09:27
yea you are right haha.
Andrei Nemes
@simplysh
Mar 17 2016 09:27
I also recommend having a look at the angular yo generator and trying to understand how it's set up, I'm fairly new to angular myself and it's helped me out a lot https://github.com/yeoman/generator-angular
Brian Veltman
@brianveltman
Mar 17 2016 09:29
Already using yeoman. I understand their scaffolding. But was wondering if the same applied to services and factories :) For now I created the services and factories directories but while creating it and adding it to the index.html I was wondering if this was the way to go.
Andrei Nemes
@simplysh
Mar 17 2016 09:30
definitely
not because that guide said so, but because it's actually helpful :)
Brian Veltman
@brianveltman
Mar 17 2016 09:31
(Y) thanks for your input :)
Andrei Nemes
@simplysh
Mar 17 2016 09:31
you're welcome
Manuel Pacheco
@ShadowManu
Mar 17 2016 15:02
You could also give a look at using a loader (recommending SystemJS). Then your index is not bloated with js imports (and you still can maintain modularity for debugging)
Brian Veltman
@brianveltman
Mar 17 2016 15:04
Thank you. Looks like a handy tool.
uday
@udaysingh010788
Mar 17 2016 16:31
can you tell me. over all design architecture of angular2 app
with directory structure
Manuel Pacheco
@ShadowManu
Mar 17 2016 16:46
you could follow a component-per-folder architecture. Base your architecture on the ones from the angular 2 cli structure or whatever you think is best. Angular is component-oriented, so I guess grouping files by component has meaning.