angular-ui-router

The Kendo UI directives require jQuery to be available before AngularJS with Kendo grid in routing template with Html5mode

隐身守侯 提交于 2019-12-21 14:59:09
问题 Why kendo load before Jquery in angular routing template with Kendo grid. I have ordered the scripts, while clicking any event through angular routing templates getting this error in console. Note: In page refresh, scripts loaded properly, the application works fine, not getting any error. Only occurred in event routing. kendo load before jquery why. order scripts : <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.js"></script> <script src="https://code.angularjs.org/1

Angular UI router $transitions.onBefore

跟風遠走 提交于 2019-12-21 12:40:51
问题 I am using angular ui router version 1.0.0-alpha.4 and since by default root scope events are inactive I thought of using new way of implementing auth mechanism as follows. .run(['$transitions', '$timeout', '$q', '$state', 'AuthService', ($transitions, $timeout, $q, $state, AuthService) => { $transitions.onBefore({ to: 'app.*', from: '*' }, () => { const deferred = $q.defer(); AuthService.isLoggedIn().then(() => { deferred.resolve() }, () => { // redirect to error page // how can i redirect

ui-sref with multiple parameters to child view not working

前提是你 提交于 2019-12-21 12:08:00
问题 I'm using Angular's ui-router on my application to try and route to child views of a main view. Both the main and the child have their own associated IDs. Currently I can navigate to the parent, but my link to the child is not working. In my Application.js $stateProvider //Working Route .state('Project', { url: '/Project/{projectId}', views: { "ContentMain" : { templateUrl: "/Scripts/Dashboard/templates/MainContent/ProjectMainContent.html", controller: function ($stateParams) { console.log(

Is there a way to access resolved state dependencies besides injecting them into the controller?

情到浓时终转凉″ 提交于 2019-12-21 12:06:25
问题 I need to access resolved data from a service or directive to do some general operations across the whole application. The only way to I seem to be able to access resolved data is injecting it into the controller. This is the test data I setup: resolve: { test: function() { console.log("resolving"); return 5+2; } } I have tried this in my controller just to see what happens, but it doesn't work: $injector.invoke(function(test) { console.log("injected", test); $scope.test = test; }); I get:

AngularJS, animations with ui router which versions work?

雨燕双飞 提交于 2019-12-21 11:54:13
问题 There have been some incompatibilities with ngAnimate and ui.router since the release of Angular 1.2. Which versions of Angular, Angular Animate and Angular UI Router work together? 回答1: The following versions appear to be compatible (installed through bower): { "angular": "1.2.3", "angular-ui-router": "0.2.0", "angular-animate": "1.2.3" } I'll update this list as I discover more combinations. 来源: https://stackoverflow.com/questions/20991255/angularjs-animations-with-ui-router-which-versions

Angular UI-Router Not Resolving with Internet Explorer 9

倾然丶 夕夏残阳落幕 提交于 2019-12-21 10:16:01
问题 I have an Angular v1.3 application, which uses Angular ui-router v0.2.13 for all routing. The site works great on all browsers, including IE 10 and IE 11, but not IE 9 (we've decided not to pursue IE8, which I understand isn't supported by v1.3, anyway). Despite my best efforts, IE 9 continually resolves to my $stateProvider's otherwise route (which is set to /*path , a possible culprit, so I disabled that route for testing purposes). In an attempt to get any other route to resolve, I've

How to update matrix parameters in Angular2

ぃ、小莉子 提交于 2019-12-21 09:33:41
问题 In Angular2, is there a way to update a matrix parameter, but navigate to the same component? Basically would like to transition easily from a url that looks like: /search;term=paris;pageSize=24;currentPage=1;someFilter=value; to the same thing, but with currentPage updated upon pagination: /search;term=paris;pageSize=24;currentPage=2;someFilter=value; using router.navigate hasn't appeared to be the best option, since I'd have to write plenty of my own logic to re-construct the url for

Make a web page with a folder of external files

戏子无情 提交于 2019-12-21 07:16:36
问题 Previously, I used $sce.trustAsHtml(aString) to inject a string (eg, <html>...</html> ) to a template <div ng-bind-html="content"></div> to display a graph when loading a generated URL: .state('urls', { url: '/urls/{id}', template: '<div ng-bind-html="content"></div>', controller: 'UrlCtrl', resolve: { url: ['$stateParams', 'urls', function ($stateParams, urls) { return urls.get($stateParams.id); }] } }) app.controller('UrlCtrl', ['$sce', '$scope', 'url', function($sce, $scope, url) { $scope

When to use custom directive vs ui-view vs ng-include in an AngularJS application?

只愿长相守 提交于 2019-12-21 06:58:46
问题 I am building a large, complex AngularJS application (think ERP system). I am having a hard time deciding when it is appropriate to use ui-view , ng-include or a custom directive + templateURL . I will give a few concrete examples to give y'all something to work with. A navigation menu that is used across all URLs of the application but includes a complex AJAX autosuggest/dropdown search box. A simple HTML footer that is the same across all URLs of the application The content areas that go in

ui-router optional param without trailing slash

走远了吗. 提交于 2019-12-21 06:58:02
问题 So this seems like a common problem but I haven't found any definite answer. Basically I have a state: .state('users', { url: '/example/:id', templateUrl: 'angular-views/example.html', controller: 'ExampleCtrl' }) I want id to be optional. Sure it matches example/ example/1234 But it doesn't match without trailing slash. example I tried $urlMatcherFactoryProvider.strictMode(false); , but that does not seem to work for this case. I could use example?param=1234 , but I prefer the cleaner