angular-ui-router

Issue with Parent Child Scope With Modal: Using angular ui router with angular bootstrap modal ($uibModal)

情到浓时终转凉″ 提交于 2019-12-24 10:26:08
问题 Here is my current code: Parent Controller vm.animationsEnabled = true; vm.open = function (size) { var modalInstance = $uibModal.open({ animation: vm.animationsEnabled, templateUrl: 'app/entities/interview-stage/interview-stage-list-add-dialog.html', controller: 'InterviewStageListAddDialogController', controllerAs: 'vm', size: 'cs', }); modalInstance.result.then(function (selectedItem) { vm.interviewPlanSetUp.push(selectedItem); }, function () { //$log.info('Modal dismissed at: ' + new Date

Angular JS ui router not showing template (no js console errors)

落爺英雄遲暮 提交于 2019-12-24 08:36:21
问题 Im just staring AngularJS app for 1st time. Followed some steps from tutorials but at the end ui router is not showing anything. Firebug is not showing any JS errors or warnings my app.js file: var app = angular.module("CRI", ["ui.router"]); app.config(function ($stateProvider) { $stateProvider .state("Login", { url: "/", controller: "LoginController", templateUrl: "views/login.html" }) }) index.html file: <!DOCTYPE html > <html ng-app="CRI"> <head> <title>LOGIN</title> <meta charset="UTF-8">

Google Authentication/Gapi: Uncaught TypeError: Cannot read property 'postMessage' of null

别来无恙 提交于 2019-12-24 08:22:29
问题 Good day to everyone! I'm creating a web app using Angular.js 1.5 , Google Authentication (gapi) and UI router . My main goal is to initialize GoogleUser at the first place, using resolve method from the main abstract state: $stateProvider .state('app', { url:'/', templateUrl: 'layout/app-view.html', resolve: { googleAuth: function (User:UserService) { return User.initCurrent(); } } }); which at that point works pretty well - it injects UserService , and call its initCurrent() method, that

Angular Url without slash with optional parameters

不羁岁月 提交于 2019-12-24 08:13:28
问题 Both ui-router optional param without trailing slash and How to define optional parameter using UI-Router without trailing slash as well? have insufficient arguments and invalid (at least for my scenario i.e. working links (href) for angular routes without trailing slashes) answers . Live Demo Link Here are the example html links <div> <a ui-sref="home">Home</a> | <a href="#/posting/">Post 1</a> | <a href="#/posting">Post 2</a> | <a href="#/posting/sami">Post 3</a> | <a ui-sref="post">Post 4<

Load a graph from a generated url

倖福魔咒の 提交于 2019-12-24 08:07:43
问题 I want to build an online html/css/javascript playground. When the code draws a graph, I want to be able to generate a url, with which users could load this graph in a browser. At the moment, in the playground, I have a button that links to the function generateUrl : $scope.generateUrl = function () { urls.create({ // allCode is a string like "<html><body><canvas ...>...</canvas><script>...</script></html>" content: $scope.allCode }).success(function (url) { alert(url._id) }); }; Then, I want

How to read $stateParms value in Angular2?

六眼飞鱼酱① 提交于 2019-12-24 07:59:19
问题 Using Ui-Router In Angular1 The stateparam value is coming using $state.params How to do the same thing in ANgular2 I tried like this this._uiRouter.globals.params.id it's working, But its not a proper solution, even I am using webstrome editor, the editor also showing error like TS2339 Property id does not exits on typeStateParams , Please help me do proper way 回答1: you can get state parameters from the Transition exportable object while configuring URL state: import {Transition} from "ui

AngularJS Node app downloads instead of loading in Internet Explorer

依然范特西╮ 提交于 2019-12-24 07:57:24
问题 Whenever I try loading my AngularJS webpage (on a node js + express server) through http://localhost:3000 , Internet Explorer just tries to download it with a random name and no file extension, instead of showing the actual page. I can't even check the console for errors, because the download attempt seems to start before even trying to load it as a webpage. The website works perfectly on both Firefox and Chrome. I am using Internet Explorer 11 , so it's not even an old version. I tried

UI Router transition superseded when traversing multi-views state-tree

百般思念 提交于 2019-12-24 07:47:29
问题 I'm trying to manage my admin page by bellow states with multi views: admin, admin.header, admin.leftPanel, admin.main, admin.tail. In the header, leftPanel, main and tail, I use $state.go to their sub states respectively to render their contents. I write bellow simple code to demo this problem. Demo states model: state1: state2view controller: $state.go(state1.state2) <---superseded state3view controller: $state.go(state1.state3) Code (plunker): <!DOCTYPE html> <html ng-app="demo"> <head>

Angular UI-Router works with template but not component

五迷三道 提交于 2019-12-24 07:37:30
问题 I am attempting to use angular-ui-router on an angular 1 project. The issue that I'm running into is that I can get angular-ui-router to work when I specify a template, but not when I specify a component. For instance, this works: var groceryListRoutes = function($stateProvider) { var listOfGroceryLists = { name: 'listOfGroceryLists', url: '/lists', template: '<grocery-list-component></grocery-list-component>', }; $stateProvider.state(listOfGroceryLists); }; However, when I attempt to specify

Angular ui.router, any result and any error

女生的网名这么多〃 提交于 2019-12-24 07:32:10
问题 I have a little problem with my views in angular. I try to use ui.router to config my routes but it doesn't work. I try to use the console but it's clear. I don't know what i can do fix this problem. (function(){ 'use strict'; const app = angular.module('myApp', ['common.services', 'common.servicesMock', 'ui.router']); app.config(function($stateProvider, $locationProvider) { $locationProvider.hashPrefix(""); $stateProvider .state('newList', { template: 'views/newsListView.html', url: '/news',