integrating angularjs and backbonejs routing - angularjs

I have an application where banner is desinged using backbone js which has its own routing mechnism. So its like when you click on banner on top its falls down like curtain and shows all the views in mosaic on dashboard.
My challenege is we are thinking now to implement app with angular js integrating this backbonejs banner.
I have already made things work with angular.bootstrap and all but facing hard time to manage the routing in backbone vs angular.
so problem is if I use angular routing somehow my backbone routing stops functioning. But if I don't use angular routing then backbone routing and angular app works just awesome.

Related

Angular Router not updating browser URL when called from AngularJS

I have an AngularJS application, which I'm in the process of converting to a hybrid Angular/AngularJS application using ngUpgrade. The AngularJS application is unusual in that it doesn't use the AngularJS or Angular UI router - instead it has its own hand-rolled navigation solution, which doesn't update the URL displayed in the browser, or interact with the browser's history API. So far, so good.
I want to start using the Angular Router in the hybrid application, but initially only for new pages.
To get the 2 parts of the application - Angular and AngularJS - interoperating with each other, I have downgraded the Angular Router service and injected it into one of my AngularJS services, so that I can call Router.navigateByUrl() to navigate to a new Angular page component, from my AngularJS code.
This works correctly - the Angular page component is added to my <router-outlet> and is displayed in the browser as expected.
Strangely though, the browser URL does not change. When I enable tracing for the Router, I can see the new route being correctly processed, and the new page is displayed in the browser, but the browser URL still shows the old route. Also, if I look at the browser history, the new route has not been added to it.
I've tried injecting NgZone into my AngularJS service and calling Router.navigateByUrl() inside NgZone.run(), but it doesn't make any difference.
When I call Router.navigateByUrl() from my Angular code, everything works fine - except when I do this after I've done it from AngularJS, when I then see the same symptoms. It's as if calling the Router directly from AngularJS is somehow breaking the link between the route and the browser URL bar.
Can anyone help please...?
So the issue was that the AngularJS $location service wasn't being updated when the route changed, leaving a disparity between its value and the value being displayed in the browser. There was also a watch in this service which was being triggered in every digest cycle, that was then resetting the browser url from the value in the $location service!
Turns out this was because I needed to configure the Unified Angular Location Service in my AppModule viz:
imports: [
LocationUpgradeModule.config()
]
and downgrade the $locationShim service for injection into AngularJS viz:
angularJS.module('my-app')
.factory('$location', downgradeInjectable($locationShim));

Angularjs and Laravel Routing

Hi I am working on a project where I am using Laravel routing and AngularJs routing at the same time but the problem is when I reload the specific page laravel routing get active and angularjs routing get deactive.
So how to prevent the pages to go for laravel routing while refesh the page?

Display/Update Breadcrumb when using ASp.Net MVC MVCSiteMapProvider with AngularJS Routing (SPA)

I am building an app built using ASP.Net MVC and AngularJS. I use MVCSiteMapProvider for building the site map and building Breadcrumb. I use Hybrid-SPA approach where part of the routing is handled by MVC and part by AngularJS. Switching between each module is handled by MVC and navigating with in the Module is handled by AngularJS (Similar to but with some modifications http://www.codemag.com/article/1605081).
My problem is with the Breadcrumb.
1) When I reload the page when in a route that is handled by Angular, the Breadcrumb is not built since the URL is not handled by MVC.
2) Is it possible to update the breadcrumb with the inner pages links when navigating through SPA handled by AngularJS.
I got rid of MVCSiteMapProvider and I use ng-breadcrumb (https://github.com/ncuillery/angular-breadcrumb)
Since you should always have a route defined at the angular level but the info at the MVC level is incomplete this is the only way to handle a complete breadcrumb.

Angular-meter with Iron:router

I want to user Angular in a Meteor app - Ionic being the main reason. I am wondering is it possible to use Angular directives for UI, but still use Meteor Data Modes, and Iron Router?
Trying to decide between Meteoric + Blaze VS AngularJS + Ionic

AngularJS routing for Kendo UI mobile

I'm starting to develop mobile application with Kendo UI mobile, AngularJS, PhoneGap. It would be nice to use Angular routing stuff. But Kendo UI mobile has its own routing system. Are any approaches to use AngularJS routing system instead of Kendo UI mobile?
Maybe some wrappers...
Well, routing for Angularjs is all client based, so you can use it without needing the kendoui routing, You just need to setup your routing for angular. You can route to any url you would like. That said, if you need specific functionality that that Kendoui provides, it has a client side version of the routing you can use JavaScript to combine the two, the syntax for the routing for both are very similar.

Resources