-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ng-flow + ui-router #34
Comments
I suspect you are loading libraries in a wrong order. <script src="bower_components/flow.js/dist/flow.js"></script>
<script src="bower_components/fusty-flow.js/src/fusty-flow.js"></script>
<script src="bower_components/fusty-flow.js/src/fusty-flow-factory.js"></script>
<script src="bower_components/ng-flow/dist/ng-flow.js"></script> This is the strict order in which files should be loaded. |
@AidasK thanks for the reply. So, I got the order to load right and I'm getting this error in IE8+9: FustyFlow is undefined <div class="ng-scope" data-ui-view=""> I should also note that I'm using Require.js. Here is my require.config: require.config({ baseUrl: '/Scripts', paths: { 'jquery': (document.addEventListener) ? ['//code.jquery.com/jquery-2.1.0.min','jquery-2.1.0.min'] : ['//code.jquery.com/jquery-1.11.1.min','jquery-1.11.1.min'], 'angular': ['//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min','angular.min'], 'angular-ui-router': 'angular-ui-router', 'angular-sanitize': 'angular-sanitize.min', 'flow': 'flow.min', 'fusty-flow': ['//cdn.jsdelivr.net/fusty-flow.js/1.0.0b3/fusty-flow','fusty-flow'], 'fusty-flow-factory': ['//cdn.jsdelivr.net/fusty-flow.js/1.0.0b3/fusty-flow-factory','fusty-flow-factory'], 'ng-flow': 'ng-flow.min', 'handjs': 'hand.minified-1.3.8', 'imageRegionSelector': 'ImageRegionSelector' }, shim: { 'angular': { exports: 'angular' }, 'angular-ui-router': { deps: ["angular"] }, 'angular-sanitize': { deps: ["angular"] }, 'ng-flow': { exports: 'ng-flow', deps: ["angular","flow", "fusty-flow","fusty-flow-factory"] }, 'handjs': { deps: ["jquery"] }, 'imageRegionSelector': { deps: ["handjs"] } }, }); Snippet from my angular module config: .config(['$locationProvider', '$stateProvider', '$urlRouterProvider', function ($locationProvider, $stateProvider, $urlRouterProvider) { $urlRouterProvider .otherwise("/"); $stateProvider .state('home', { url: '/', templateUrl: 'templates/home.html' }) .state('create', { abstract: true, url: '/create', template: '' }) .state('create.home', { url: '', templateUrl: 'templates/create.html' }) .state('create.done', { url: '/done', templateUrl: 'templates/done.html' }); }]) .config(['flowFactoryProvider', function (flowFactoryProvider) { flowFactoryProvider.defaults = { target: _SERVER_ + '/photos', query: function (file, chunk) { return { "mediaType": file.file.type } }, singleFile: true }; /* flowFactoryProvider.on('catchAll', function (event) { console.log('catchAll', arguments); }); */ flowFactoryProvider.factory = fustyFlowFactory; }]) and snippet from create.html : <main data-ng-controller="creatFormCtrl"> <form name="createForm" data-ng-show="!steps.preview.active" data-ng-submit="submit()" novalidate> <div class="col12" data-flow-init data-flow-file-added="!!{png:1,gif:1,jpg:1,jpeg:1}[$file.getExtension()]" data-flow-files-submitted="$flow.upload()" data-flow-file-success="setPhoto($message)"> .... </div> </form> </main> It's failing once it routes to the Create state. Any ideas would be greatly appreciated. Thanks once again. |
Are these links valid? There might be an issue with One more issue might also occur, because fusty-flow does not have flow require statement: Hope this helps. |
Might be fixed, closing for now |
I'm using ng-flow on one of the pages in my route. For HTML5 compliant browsers everything works fine. But for IE8+9, which I unfortunately have to support (insert head banging) it's throwing an error. I've added the fusty flow files, but the directive (flow-init) is throwing an error that FustyFlow is undefined. Any ideas/suggestion on how to tackle this would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: