Comments (4)
Could you post the states you've declared in your app config please?
Which version of angular are you using?
If you could post a stripped down example somewhere that would greatly help.
Thanks
from angular-gsapify-router.
Hi,
I use:
AngularJS v1.4.0
Angular UI routier v0.2.15
This is my routing (I pretty much copied from the demo)
(function() {
'use strict';
angular.module('myapp', ['ngTouch','ngCordova','ngAnimate', 'ui.router', 'hj.gsapifyRouter', 'myapp.controllers'])
.config(['$stateProvider', '$locationProvider', '$urlRouterProvider', 'gsapifyRouterProvider',
function($stateProvider, $locationProvider, $urlRouterProvider, gsapifyRouterProvider) {
gsapifyRouterProvider.defaults = {
enter: 'slideRight',
leave: 'slideLeft'
};
//...more transitions here
gsapifyRouterProvider.initialTransitionEnabled = true;
$urlRouterProvider.otherwise("/");
$stateProvider.state('signin', {
url: '/',
views: {
main: {
templateUrl: 'templates/signin.html',
controller: 'SignInCtrl'
}
},
data: {
'gsapifyRouter.main': {
enter: {
'in': {
transition: 'fadeIn',
priority: 1
},
out: {
transition: 'fadeOut',
priority: 1
}
}
}
}
});
$stateProvider.state('menu', {
url: '/menu',
views: {
main: {
templateUrl: 'templates/menu.html',
controller: 'MenuCtrl'
}
},
data: {
'gsapifyRouter.main': {
leave: {
out: {
transition: 'scaleDown',
priority: 2
}
}
}
}
});
}
]);
angular.module("myapp").run(["$templateCache", function($templateCache) {
$templateCache.put("templates/menu.html", "<div class=\"wrapper\" style=\"background: #81B270\"><br><br><h1>Menu</h1><br><button ng-click=\"signOut()\">Sign out</button><a href=\"#/\">Sign out</a></div>");
$templateCache.put("templates/signin.html", "<div class=\"wrapper\" style=\"background: #FF7F40\"><br><br><h1>Sign In</h1><br><button ng-click=\"signIn()\">Sign out</button><a href=\"#/menu\">Menu</a></div>");
}]);
})();
Also, I cant use templates on disk. I have to use $templateCache otherwise I get Error: undefined is not an object (evaluating 'state.data') when the first page loads.
from angular-gsapify-router.
Until I have some more time to test I think it'd be best to revert to angular 1.3. I believe ui-router still has some issues with 1.4 too - mainly due to breaking changes in the way $animate
works
from angular-gsapify-router.
Thanks, that solved it.
from angular-gsapify-router.
Related Issues (20)
- Set animation with state.go HOT 2
- Angular 1.3.7 HOT 1
- Laggy Performance on iOS HOT 3
- Modal hidden HOT 3
- Page (state?) moves down when clicking HOT 6
- What's the src file? HOT 2
- Issues with transitions and ui-view HOT 1
- transition on first load of state, no previous state HOT 8
- Where can I see a list of the animation names that this comes with? HOT 12
- TweenMax not defined HOT 1
- Could not resolve '' from state 'gsapifyRouterBlankState' HOT 8
- Using resolve inside the router gives gsapifyRouterBlankState error HOT 1
- Slider previous and next HOT 2
- Not working with angular material HOT 3
- State not re-resolved properly by forced initial transition
- Missing content on page after transition HOT 3
- Leave blocks and priority not honored with ui-router 1.0 HOT 3
- Angular Type Checking not the same as previous logic HOT 2
- not firing gsapify router on initial app load HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-gsapify-router.