Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9208533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:38:16+00:00 2026-06-18T00:38:16+00:00

I recently started to digg in to angularjs, and would help me a lot

  • 0

I recently started to digg in to angularjs, and would help me a lot with my new project, but im stucked with the view structure part.

So what i dont really understand is, how to build it up.
Is it okay if i create html angular partials and not creating laravel views, so laravel would only handle the database instert fecth edit delete, and the angular partial views would handle the result show, and forms.

So my buold up would look like this.
My assets folder

/css
/img
/js
 /lib
 /partials
         /home
             index.html
         /users
             users.html
             details.html

And creating restful controllers for them what handlets listed above

Or if someone could show my a basic exaple about this, just the controller and view part, how to build up a singple page with showing result, and one with grabing by id i would really be grateful.

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:38:17+00:00Added an answer on June 18, 2026 at 12:38 am

    When starting a Laravel & AngularJS project you are in charge of the backend and frontend. Basically you have 3 options.

    1. Keep the entire app in the same folder, and the angularjs stuff in the public folder.
    2. Keep the entire app in the same folder and AngularJS views in the laravel view folder.
    3. Separate your backend and frontend completely.

    The first & second option are the simplest, and its OK if you have a small/medium sized application. In this case just keep all the AngularJS files in the public folder, or if you choose to mix them with laravel views just drop the .blade extension (or change the laravel blade/angularjs template syntax)

    I see its best to keep the backend as restful as possible when doing a SPA app, the point is to push the logic to the browser, this means your app can become a mess if you mix php with js too much.

    The folder structure is totally up to you, and it does not matter what option you choose. But a good start is separating you app into a logical parts.

    /app
        application.js
        /partials
             user.html
             login.html
             etc.html
        /vendor
             Angular.js
             Lodash.js
             Etc.js
        /controllers
             User.js
             Etc.js
        /directives
             Charts.js
             Etc.js
        /filters
             Custom.js
             Etc.js
        /services
             Backend.js
             Etc.js
    

    You can also check this for a good angularjs styleguide.

    The above is a basic folder structure, just customize it as you see best. If you have a small app, you could drop the folders and just have a controllers.js directives.js and services.js (etc)and keep all your javascript in the same file. This is totally up to you. Separate when the application grows, and always refactor.

    If you choose the third option you will have to customize the backend a bit. This might be the hardest option, but it also gives you great flexibility. Basically you could drop laravel all together, and build the backend in node.js, or use laravel as a backend for another SPA app written in Ember.js without making any changes in the code. Note if you are choosing this option you cannot make use of some laravel stuff, like the blade templating. You will also have to setup your laravel app for CORS, and note, there can be some more coding when it comes to security, like CSRF tokens and such.

    When going to production with you app you can use a build tool to min & concat you frontend app into one file. Checkout ng-min for minification.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently started a new job where the office environment is Mac-based, but I
I recently started maintaining a .Net 1.1 project and would like to convert it
I recently started a new webforms project and decided to separate the business classes
I recently started learning backbone and was wondering what would be the best way
I recently started a project in Symfony2 and I need to run some methods
We recently started making use of the new Google Expansion APK mechanism. Overall it
I recently started learning knockout js, which I believe would suit for one independent
I recently started to learn Django and found it amazingly useful. But there is
I recently started a project where the team decided we'd like to use jQuery
I recently started digging into C# but I can't by my life figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.