Web with 2 angularjs project - angularjs

I want to make angularjs project name A and B,
But i want B will be inside A,
I ask my developer and he said just build those 2 and put it together,
But when i do that, it keep have this error
So basically it looks like this:
I grunt build project A and B and make this structure:
Project A
-css
-js
-scripts
-styles
-views
-index.html
-home.html
-BProject
css
js
scripts
styles
views
home.html
index.html
And when i try to go to www.a.com/b/index.html, it making that error,
Anyone know what is wrong?
Do i need to change the app.js for both routing?
I'm using html5 mode for those 2 project.

I found a way, this article help me to setting my project.
I just need to add <base href="/bproject/"></base>
and set my nginx configuration :)
Link :
http://ajbogh.blogspot.kr/2015/05/setting-up-angularjs-html5-mode-in.html
Hope it can help you guys too :)

Related

Applozic Meteor integration

I cant able to run applozic-web fullview ui with meteor (1.4.2.6).
(https://github.com/AppLozic/Applozic-Web-Plugin)
I've put src folder under /client/compatiblity folder. I'm newbie and i'm not sure how exactly use jquery plugins. Here is my html code is on http://pastebin.com/6canHZnK
respective js code is nearly empty.
I got ui screen with no functionality.
Thanks in advance.

Best structure for starting an angular js app?

I am creating a new angular js web app for a website, this will not be SPA.
I will use these libs ui-router, ui-bootstrap, ngResource, in starting.
so, can anyone help me by giving a suggestion on these questions.
which structure of files I need to follow?
any link of demo made with standard structure or jhon papa's style guide?
how to include states in ui-router dynamically.
way to add as minimum as possible files in head.
I see you like jhon papa's style guide, he created some demo for that. Here is the structure :
/build (created on the fly)
/gulp
/src
/client
/app
/content
/test
/server
/data
/routes
reference: https://github.com/johnpapa/ng-demos/tree/master/modular
For add minimum file (in this case is JS file or CSS), you can concat several your js file into one file use gulp or webpack. With that, you can minified & uglified too.

AngularJS in WebStorm

I am trying to build an application using d3js in WebStorm because I read that it is the best way to organize your AngularJS project.
However, when I start a new project, select AngularJS project there supposed to be a "hello world" example ready where you have your index.html pointing to view1 and then you click view2. But what happens in my case is that when I click run index.html view1 doesn't appear even when I click on the link leading to it or to view2.
Is there a configuration missing ? Do you know how I can correct that ?
Have you done a bower install to download all the dependencies your project needs ?

how to add angular files on yeoman generator ionic

I'm using generator-ionic from link, and It made well, but I want to know how to add angular controllers or directives files.
It's not like app when I made with 'yo angular'
there is no views folder and files neither.
'yo angular:directive myDirective' not work.
do I have to make all files and folders by myself?
I found that the Angular Generator works fine with a project created by yo ionic. You are correct that the folder structure is different, but that may not a problem for you. You could always start with a completely blank ionic template, and then start adding the pieces you need. Your app.js and index.html files will be where the Angular Generator expects them to be.

Modularized architecture for ExtJS?

If I want to build a large application with ExtJS how am I supposed to use Modularized architecture?
Ex,
/app
/registration
/app
/model
/view
/controller
index.html
/lab
/app
/model
/controller
/view
index.html
index.html
(got it from somehwere :D)
is this the recommended approach?
I need to use MVC architecture too, advice? suggestion?
Simple version of my question :
How to put the code into modules while using MVC with ExtJS
:)
=================================================
updated on 03-29-2012 :D
I'm new to ExtJS, so i'm still having the problem :(
My intension is to put code in to sperate manageble modules
like,
core - for core functionality
radio - separate module, something realted to Radio
tv - separate module, something related to TV
This is what i need
/core
/controller
/(...)
/radio
/controller
/(...)
/(...)
But as Dimitry told, may be this is impossible (current framework)
So....
are we supposed to do something like below?
/controller
/CoreController
/RadioController
/(...)
If this is the case, im sure i will run in to problems very soon :(
Thanks
As a start point, I'd recommend reading over the sencha documentation on using their client side MVC architecture.
The link can be found here: http://www.sencha.com/learn/the-mvc-application-architecture/
The current version of framework does not have a straight forward way to modularize an app.
What people generaly do is initialize secondary controllers when they are needed instead of at strartup by app.js
The key is to call init() method on the secondary controller. That sets up it's listeners.
Here is an example of such solution: https://stackoverflow.com/a/7649658/834424
Edit: this means you only have one app.js not two as in your original question.

Resources