1

Up until now I have been building my application using the following structure.

/src
    /components
       /shared
          /messagebox
          /alertbox
       /Home
       /About

So as you can see I have shared components which are components being used on other components / pages. and I have the concept of Home, About which are also components (which translate to viewable pages) as everything in Angular is now supposed to be a component - right?

Does anyone have a better implementation of the structure of a NG 1.5 app?

I now need to create some filters and as far as I am aware I cannot hang these off of a component, so where is the based place for putting this type of file?

Also other things that come to mind are constants, services etc.

There is no recommendation on Angular docs site as far as I can see.

1

1 Answer 1

1

The one which i used to follow for my project is :

project
  /www
    /assets
    /components           // directives
      /accordion
        /accordion.html
        /accordion-directive.js
        /accordion-controller.js
        /accordion-controller-test.js
    /core                 // shared services
       /route
         /router-service.js 
    /sections             // pages we build by adding components
       /registration-page
         /registration.html
         /registration-controller.js
         /registration-controller-test.js
    app.js         
    index.html
    index-controller.js
    app-configuration.json // for keeping constants

this might help you.Please check.

Sign up to request clarification or add additional context in comments.

1 Comment

acCordion-controller.js

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.