angular-ui-router

form validation not working correctly in ui-router/ui-view using Bootstrap

前提是你 提交于 2019-12-13 05:14:39
问题 I have a form validation using bootstrap and It is working, but when I added it to my project that is running UI-router if breaks some of the CSS functionality for the function. So I think that it is being broken by the UI-Router. Basically it won't hind the error message until it is called. It just loads into a visible state. Is there someone that has run across this that could take a look at it. I have two Plkr illistrating the issue. One working without UI-Router and On Not working With UI

AngularJS: Correct way of doing directive with dynamic template and replace option on?

只愿长相守 提交于 2019-12-13 04:56:04
问题 What is the easiest(and correct) way to have dynamic templates for directive and keep replace option (want to have all the attributes on my template). I'm trying to create "link" directive that will be extension for ui-router/ui-sref : when the state is current state - we show just a text (not a link). It's not a problem to do just dynamic templates via compile(or $compile service), but how could I keep replace option on, that passes all the directive attributes to the template. So I would

Angular Material Tabs + ui-router: body not loading

旧时模样 提交于 2019-12-13 04:48:50
问题 Update : the use of ui-sref and md-tabs was fixed in Angular Material 0.10.0 First of all, we're aware there's several issues similar to this one. However, we've been trying for hours, and still no luck, so let's see if someone can shed a bit of light on this particular case. We are trying to have two tabs, with two different views an two different controllers. The tabs render fine, they work, and the URL changes on tab change, but the tab "body" is never loaded. The ui-sref is defined in a

Can ui-router handle multiple parameters in AngularJS?

末鹿安然 提交于 2019-12-13 04:08:32
问题 I have an app that is currently built to have a static base URL with a parameter at the end. I would like to instead have the base URL default to one vaule, but have the ability to built routes based on several options. So for now its set up as: .state('ball', { parent: 'ballLayout', url: '/ball/{urlName}', views: { 'cube.head': { templateUrl: 'partials/views/ball.head.html', controller: 'BallCtrl' } } }); The static ball value is what I'd like to change. Basically I'd like to have an

'UI-Router-Extras' - Can't Attach / Add New 'FutureState' Objects After App.Config() Has Already Loaded

半城伤御伤魂 提交于 2019-12-13 03:34:32
问题 I am having problems with adding new states to the runtime phase of my app using ' UI-Router-Extras '. I have been trying for quite some time now to get new states attached and loaded AFTER a user has successfully authenticated using the ' UI-Router-Extras ' plugin 'ui-router-extras' Here is a reference to the 'UI-Router-Extras' Examples for the FutureState documentation that i'm using, but I feel like maybe my scenario is either slightly different that what's shown or I'm missing something

UI-Router 1.X - how to handle exceptions thrown from resolve functions

对着背影说爱祢 提交于 2019-12-13 03:24:39
问题 Exception in resolve function while transitioning to a new state in angularjs I've a code to transition to new state on a button click, but one of the resolve functions is failing due to some error at the server. How and where should I handle this exception. I've tried the method described in this link https://github.com/angular-ui/ui-router/issues/1783, but it didn't help. I'm not sure if I'm doing it right or not. This is what my code looks like after taking it from the link, upon setting a

Nested promises in ui-router resolve

╄→尐↘猪︶ㄣ 提交于 2019-12-13 02:37:36
问题 I have been struggling for a while with the following problem: I would like to get some data before the view shows, (resolve). But some of the data is dependend on the result of another promise. It goes like this: I get the job id (index) from the $stateParams and look up the data in my Service. Once it is completed, from this result (the job), I can look up the settings and floors (each from a different service), both return a promise. What I've came up so far jobinfo: function(Jobs, Floor,

Ui-router URL changes, nested view not loading

被刻印的时光 ゝ 提交于 2019-12-13 02:34:47
问题 I've been working on an app and had done it before with ui-router but with ionic and it worked. As in the title, the URL changes correctly to what I'd expect, however nothing happens after. I know that the template is correctly found because it's loaded into ressources. I generated an yo angular-fullstack template and every view is loaded to an ui-view in the index.html but this one. I created /shifts with angular-fullstack:route shifts and the controllers with angular-fullstack:controller

TypeError: Cannot read property 'go' of undefined

寵の児 提交于 2019-12-13 02:13:06
问题 //controller pour connection to API .controller('LoginConnect', ['$scope','connecting','sendtoken','$state', function($scope,connecting,sendtoken,$state){ var token = []; $scope.user = {}; var users = $scope.user; var cgtpage = false; $scope.connect = function (users,token,$state) { var log = $scope.user.login; var pass = $scope.user.password; var mydata = {}; connecting.login(log,pass).then(function(result){ var montoken = result.data.token; sessionStorage.setItem('token',montoken); console

ANGULARJS - display title inside h1 on homepage and div tag for the rest of the site

梦想与她 提交于 2019-12-13 02:03:46
问题 For accessibility compliance: How do I display the title of the page inside an <h1> tag on the homepage, while display inside a <div> tag for the rest of the site. I am using angular UI-Router , with the homepage having a state of 'home' . app.js: magApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) { $urlRouterProvider.otherwise("/404"); // Now set up the states $stateProvider .state('page_404', { templateUrl: 'apps/templates/404.html' }) .state('home', { url: '/',