We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Loading syncfusion scripts on page break angular routing

Thread ID:





123560 Mar 30,2016 09:05 PM UTC Apr 1,2016 04:28 AM UTC JavaScript 3
Tags: ejmMenu
Asked On March 30, 2016 09:05 PM UTC

I made simple syncfusion-angular application with only one template and router. For routing I use angular-route library.
This is my simple router script:
(function() {
angular.module("mainApp", ["ngRoute", "ejangular"]);
.config(function ($routeProvider) {
.when("/events", {
templateUrl: "views/events.html",
controller: "EventsController"
.otherwise({ redirectTo: "/events" });
Below is my main page head section where I read all my scripts.
Event Management

It is strange that my page routing does not work after manual refresh (page url breaks). I realized that problem caused scripts jsrender.min.js and ej.mobile.all.min.js, or one of them.
When I delete them from page (exclude scripts tag on page), my routing works perfectly.
Do my scripts order on page is wrong ?
Problem is described in more details on stackoverflow.

Dhinesh Ravi [Syncfusion]
Replied On March 31, 2016 07:15 AM UTC

Hi Milos,

Thank you for contacting Syncfusion Support.

The script file ej.mobile.all.min.js is a collection of Essential Studio JavaScript Mobile components. In that, AppView acts as a base container and master page for the Mobile application. We have handled the history navigation internally for Single Page Applications, which interfere for Angular routing. Hence for Angular routing, we need to prevent the initialization of AppView. Refer to the following code example.



        App.preventAppviewInit = true

The above mentioned script have to be referred next to ej.mobile.all.min.js script reference.

We have created the simple sample for the requirement. Refer to the sample in the below attachment.


Note: If you are developing for web application alone, then ej.web.all.min.js is enough. No need to refer ej.mobile.all.min.js and the code example shown above.

Dhinesh R

Replied On March 31, 2016 07:55 AM UTC

Thank you very much for the prompt reply. It works great.
This kind of issue is a bit hard to notice, maybe would be nice that we have some warning about this in angular section.

Best Regards,

Dhinesh Ravi [Syncfusion]
Replied On April 1, 2016 04:28 AM UTC

Hi Milos,

Thanks for the update.

We will consider your suggestion in the online documentation and it will be refreshed in online in any of our upcoming release.

Dhinesh R


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon