Sencha 2 Routing with Deft JS - mobile

Does sencha touch 2 routing works with Deft JS ? I am extending my controllers with Deft.mvc.ViewController instead of Ext.app.Controller and looks like routing is not working.

It doesn't seem to be working: https://github.com/deftjs/DeftJS/issues/44
As a workaround I'd try to use DeftJS controllers as ViewControllers to control the logic of the app and ExtJS controllers as RouteControllers to work with routes. To separate them, put ViewControllers next to views and model as have been done in ExtJS 5. RouteControllers shall go to app/controllers directory.
Another option is to use Ext.ux.Router.

Related

AngularJS1.2 & Angular using Microfrontend

I am working in a project which is developed using AngularJS1.2, since it is older I am thinking to write feature modules in separate app using Angular and then with the help of Microfrontend thinking to combine with older app. To achieve this, I am not able to get a good source/guide. Can anyone please help me.
I see 3 ways but haven't tried any of them though. So, I don't have any working solution.
Have a route from angularjs that points to angular app(full page load) and everything from there onwards, angular handles everything. There is no angularjs involved. This may not be the best option.
Let angular code load on demand when the feature is required and provide placeholders for the angular features inside angularjs project. This way you can share custom scope to nested child angular project.
Use web components developed in angular(angular elements) and use them in your angularjs application. They work independent of technology/framework/library.

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.

Tabs and Carousel in Angular JS

I want to implement tabs and inside the tabs route to a carousel.Can anybody provide me the code sample as I am new to Angular JS and have issues implementing routing inside tabs in Angular JS.Here bootstrap can also be used in Angular JS.
ng-view is not good for you maybe as you can have only 1.
try to take a look at ui-view in angularUI project to enable multiple views with sub views.
as for carousel and tabs, you got implementation for that with angularUI/bootstrap/jqueryUI so no need to implement by yourself.

can I use EJS with AngularJS?

Hi I am new to AngularJS. I have great web app already running with JQuery and jQuery UI.
Now I want to completely get rid of JQuery and am going to migrate to Angularjs because of its MVC (MVW) pattern.
So my jQuery application is running with EJS for templates and entirely DOM manipulation. But when I think about Angular js, I have doubts. Can I still use EJS or not?
So please guide me whether I can use or not.
Another doubt is, let's assume I have list page. It is updated dynamically, and it will display 10 records first then based on user scroll, the next 10 records will be appended in the DOM after AJAX. Can we append to the DOM dynamically using Angular?
How do I achieve these kind of things in Angular?
You can use EJS (server or client side) in combination with Angular but there's no need and you'll probably overcomplicate things. AngularJS is very capable for manipulating the DOM by itself in a very separation of concerns kind of way. The most elegant way to work with Angular is to have a RESTful backend and just serve some static html/js files from a webserver.
As for endless scrolling, there are tons of ready to use plugins (modules) to choose from or you can write your own. Basically this will need a view with a ng-repeat directive to display the currently loaded items and a directive that will notify a controller/scope to load more items when the user is scrolling down.
A nice simple article can be found here.
Similar questions:
Mixing angular and asp.net mvc webapi
Actual use of jade template and angularjs
Yes of course you can use EJS with Angular JS. You might want to have a look at this;
https://gist.github.com/jrmoran/4277025
And about your DOM manipulation question. Yes you can append DOM dynamically using Angular JS. Angular JS have a strong feature of two way data binding which dynamically updates its DOM content when a model variable changes.
Have a look at this:
http://docs.angularjs.org/guide/databinding

Changing pages in AngularJS (under requireJS)

I'm a beginner in AngularJs and I have a simple question: How do I change pages in AngularJS?
Not using router (ng-view) in AngularJS since I need a new html page where there's no common templates. I tried to use "ng-href" but it doesn't work well, since the system works under requireJS and the new html doesnt contain any js or css that I need. (except I force to add them..)
Does anyone has got some idea?
you can achieve with some template engine like "Swig" http://paularmstrong.github.io/swig/ with has a layout template were you base js and css and you can extend it.

Resources