Symfony 1.4 and angularJS - angularjs

As mentionned in the title I want to use angularJS with Symfony1.4.
Is that possible? and How to integrate this framework with Symfony1.4?

Of course you can.
If you are familiar with AngularJS you should now that the important things to be considered is to import correctly the script files, and to declare correctly your app and controller.
The same has to be done in Symfony, importing scripts and declaring Angular app.
I'm actually using it, and it works great.

you dont need integrate Angular with Symfony because Angular is a Javascript framework (client) and Symfony its a PHP Framework (Server). simply you can make a API with symfony a simple static entry point for start the angular application and use the API from the Angular App

Related

Use Angular 2 pages in Angular 1

Currently we have application developed in Angular 1.X but we don't want to migrate from Angular 1.X to Angular 2, Since it is very wast application it will require more effort. We want other way around . Can we use Angular 2 features within Angular 1.X Application. In future whichever pages is created should be in Angular 2 but need to be worked side by side with Angular 1.X .. Like calling new route or new component from Angular 2 from Angular 1.X. Please let me know whether its possible or not.
Thanks
Kind of. What you are looking for is an Angular Hybrid app. Here's an article to help with what you are looking for.
Yes, it is possible.
You can use the new angular components/modules in a legacy angular application (downgrading) or you can use legacy components in the a new angular application (upgrading).
There is a section on the angular webpage describing all this. Direct link is here
https://angular.io/guide/upgrade#using-angular-components-from-angularjs-code

routing between angular js and symfony 2

How to make routing of a symfony application in angular js ,I have a symfony application with its templates and I can make the routing of the templates of this application by angular js
thanks you
I am not quite sure what you mean to ask, but probably you are looking for a way to access your Symfony routes in Angular.
In that case, take a look at the
FOSJsRoutingBundle
It provides a javascript object that you can use to generate urls much like the path() function in Twig. For example:
Routing.generate('your_route', {'foo': 'bar'})
You only need a few steps in order use use.

Creating first angularjs SPA with VS2015

I am new to AngularJS and need some advice on how to structure a SPA with Web API for an external search application
Di I have to use
•MVC / razor views (leave all routing and rendering to Angular)? or just use 1 VS2015 app [use angularjs SPA template for VS2015 or just an empty web application with angular file and a webapi project under same solution?
any examples would be helpful to understand
For angular structure I am reading Google best practice and John Papa
Well, I think what you ran into now. I can suggest two of the ways you can choose.
If you want to keep your backend and frontend together you can go for angularjs SPA template for VS2015. It would come with the build pipelines, bundles and everything you'd need. Now you can choose to render your single page of angular to be rendered with a MVC razor view (if you want to have any mechanisms where you'd want to include your dependencies through the razor view) or just go with a blank html and web api controllers on the back. But you'd end up using one environment for all and I think that's best if you're building the full project.
Now, for the other way around, you can start with an web api project. You can instantiate your angular project with it or somewhere else. You can use yeoman or any scaffolding tool you like and use your own JS toolings you'd like to use. You can do the same in the VS project too but this approach is better if you want to keep the frontend and backend flavor separate.
And I'd suggest using typescript too.

IONIC and Angular as Front-End developments

What I want to get from IONIC and Angularjs right now is just using that front-end library like CSS and JS. So far we use bootstrap and jquery for frontend framework, and Laravel for its backend. Now I want to switch from Bootstrap to Ionic, and from jquery to AngularJS.
In this case, I will use ionic not only for hybird app development (what I have been doing so far), but right now I also want to use it for web too.
Last Framework I use to build web app:
Laravel
Jquery
Bootstrap
But the framework I want to use right now are:
Laravel,
AngularJS,
Ionic,
Is it possible for them to work as what they are? and how to set it up.
Please notice that my focus right now is to build web application here, not mobile app. And my environment for this is LAMP. Please direct me to the correct way for this. Many thanks in advance!

Technologies to create a hybrid application in Cordova

This is not a programming question. If it is not appropriate to post it here, just advise me some place worth to share this.
What would be best to know in order to startup a project in Cordova. What i need to know is that in order to create a working web and android app what should i use?
So far
I use Cordova.
Ionic for GUI.
PHP and MySQL for back end
Angular JS for client side and controller for the app.
JSON
Do I have to use AJAX as well? if so, where would it fit?
"Do I have to use AJAX as well? if so, where would it fit?"
Yes, you should build a Single Page Application inside Cordova using any framework that you desire. Ionic/Angular is a valid choice here, other options include JQuery/Bootstrap, React JS, Framework7, OnsenUI and pretty much any combination of JS single page application framework and mobile focussed web front end framework that you like and can make work together.
For going beyond what the web view can do you'll use off the shelf plugins, or write your own which will need Java / Objective-C / C# or Swift skills depending on which platforms you're using.
As you want to be building a single page application you will need to make AJAX calls to get resources from servers, call APIs and the like. Do this using the mechanism built into your chosen framework, e.g. $http service with Angular, $.ajax for JQuery etc.
With angular you can use AngularJS $http
Link to Angular documentation: https://docs.angularjs.org/api/ng/service/$http

Resources