AngularJs How to have multiple Views (more than 2) and each view have more than one state( using tabs) - angularjs

I am trying to create one html page using AngularJs with multiple views. And each view have nested states. When I am trying to use two view with nested states. It's only displaying one. Please tell me if I can use any particular steps or any link. It will be really helpful.
I have folder structure like shown in the attached imageFolder structure.
--Trying to add three child views into Parent-folder.html
A little view of what I am trying to do.

The following link will be helpful to explore nested state in angular ui router
multiple states by name

Related

How to create custom data table directive using AngularJS

Right now I am using ng-datatable for displaying data in a table, but I want to write a custom directive to display data in a table grid.
I'd recommend going to another site for the tutorial on creating a directive/component. Nothing really beats the AngularJS site itself, but there is a ton out there. For directives AngularJS Directives, for components AngularJS Components. Considering web components are more robust than directives I would recommend going the path of the components.
For example:
You can split your grid into many different factions for modular/reusable components throughout your project. Create a component for your header, a single row (pass each record from your collection into the row component), a pagination component, filter/search component, etc.
Good luck on your endeavors.

AngularJS - Shop list best practice

I'm new to AngularJS, and i'm want to know what's the best and easiest practices to do this simple shop list application.
So this is my shop:
I got three servers in my select input. Each server got own list of items, displayed in another component.
I'm thinking about creating routes with variables like localhost:4200/shop/{server1} which gonna show my list of items based on url path. Select option will just change path in my application to show shop list for specific server.
Is it a good practice, or there is better and easier solution to implement this simple shop application?
If you're asking if filtering data with routing is a good practice with Angular, I can say that it is not a bad one. Here's a link to the official Angular documentation about routing : Angular - Routing
But if you're asking if it is the only way to filter data or spread parameters, the answer is clearly no. Angular projects are SPA (Single Page Application), so you can do everything without touching the url.
For a quick example, you can attach a (click) event on your elements that display the shop list you want
I think you can use just one component and three different click events to display three different results. One component can work in your case. Using a router and routing logic for your requirement will be a costly affair. Your user will have a better application feel if these are covered in just one component and with three different click events.

Creating Backbone application

I am creating a single page application using backbone.js.
My scenario is to render three different layouts in the same page on clicking three different clicks.,,should I create three render functions for these click events in the view?
You could create three different render methods, but it would probably make more sense to make a different view for each page. You can then hook each of those views up to separate routes to get three (pseudo-) pages.

General approach of left side menu that loads different content in a center of the page

I've started to learn AngularJS but I need some application design hints. Of course I'm not asking about the layout but ... how to design my application and it's controllers in a proper way. I have left sidebar with a menu that is loaded from the web using JSON. That needs a controller. That's fine. It works for me. There's a content box as well in a center of my page that loads some data dynamically. In my opinion it requires another controller.
And now comes my solution, that somehow doesn't look good IMHO. When I click a menu item in my sidebar I'm loading a content. Then I'm passing this data into a Service which emits an Event afterwards to the Second controller (which is responsible for controlling my content in a center of my page). When it receives this event it simply gets previously loaded data from the Service and displays it. It generally works.... but ... I'm pretty sure that's not the proper way of doing this.
I would be grateful for any hints. AngularJS has a really poor documentation and tutorial :(
cheers
EDIT:
OK. That's my basic application using JQuery:
http://greatanubis-motoscore.rhcloud.com/index
And that's the same application I'm converting into AngularJS:
http://greatanubis-motoscore.rhcloud.com/angular/index
No worries, some text is in Polish but... I think it really doesn't matter ;)
Note for the AngularJS version: At the moment the content is a HTML but finally it will load JSON data as the other controllers.
I would go about doing this with angular ui-router. With ui-router you can achieve this in a couple of ways. You can use nested routing to have a base state (Your sidebar menu, header etc.) which will act as your shell page, this can have its own controller as well. You could then define each of those other views as child states of the base state. These child states can also have their own controller/views as well, but they will be sitting inside the base state (both visually, and also inherit $scope properties of the base state) optionally they can have separated URLs themselves, but they don't have to, you can just change states without changing the url, by leaving the URL bit empty when you define different states in your $stateProvider configs. Another way would be to use the multiple named views feature.

Can cakephp have multiple 'content'?

So in cakephp's layout we have the
$this->fetch('content')
right? does it mean i can only have one 'content' in one layout? I really need multiple content from multiple controller can it be done? how? please help me!!!
The layout isn't capable of pulling information from the controller. The controller is the place where the view is prepared to be placed within the layout.
When you access a CakePHP URL, it's in the following format:
http://example.com/controller/action
In other words, you're connecting directly to the controller, not the layout.
You use the controller to get data from the Models and then when everything is ready you set it to a view and then the view is displayed, with the layout wrapped around it. So, you only put HTML/CSS etc in your layout if you want it to appear in all of your views.
To answer your question, though, your controllers don't actually have any content. Your content is (presumably) in your database. Databases are accessed using Models and it's possible to pull data from multiple Models using a single controller, which is usually done by defining relationships between multiple Models.

Resources