angular-ui

How to pass parameter when I redirect the page in angularjs using ui router?

ε祈祈猫儿з 提交于 2019-12-18 12:56:43
问题 I am trying to pass parameters via the ui-router state.go However, I am not sure how to pass the parameters. Here are my codes app.config(function($stateProvider) { $stateProvider .state('first', { url: '/first', templateUrl: 'first.html' }) .state('second', { url: '/second', templateUrl: 'second.html' }) }) //my first.html app.controller.('firstCtrl' ,["$scope", "$state", function($scope, $state){ $scope.userInput <- come from user $scope.clickThis=function() { $state.go("second", $scope

Angular-UI Modal resolve

允我心安 提交于 2019-12-18 11:32:21
问题 Dear all I am new to Angularjs I am creating a modal with Angular. One of the example I found online is following which I have difficulty understanding $scope.checkout = function (cartObj) { var modalInstance = $modal.open({ templateUrl : 'assets/menu/directives/payment-processing-modal.tmpl.html', controller : ["$scope", "$modalInstance", "cartObj", function($scope, $modalInstance, cartObj) { }], resolve : { // This fires up before controller loads and templates rendered cartObj : function()

Angular UI Bootstrap Vertical Tabs

拥有回忆 提交于 2019-12-18 10:55:27
问题 Using Angular UI Bootstrap, how do we build vertical-stacked tabs that is left-aligned to the tab content which looks like this? 回答1: Another solution is to create something like this <div class="row"> <div class="col-sm-3"> <ul class="nav nav-tabs nav-stacked nav-pills" role="tablist"> <li ng-class="{'active': view_tab == 'tab1'}"> <a class="btn-lg" ng-click="changeTab('tab1')" href="">My Tab 1</a> </li> <li ng-class="{'active': view_tab == 'tab2'}"> <a class="btn-lg" ng-click="changeTab(

angular ui-router: get $state info of toState in resolve

时间秒杀一切 提交于 2019-12-18 10:27:38
问题 Update : this should be possible in angular-ui-router as of 1.0.0alpha0 . See the release notes https://github.com/angular-ui/ui-router/releases/tag/1.0.0alpha0 and the issue https://github.com/angular-ui/ui-router/issues/1018 I created. I would like to access the state's name and other attributes the app is navigating to using angular ui-router when working on the resolve. The reason: I want load some user data (including their access rights) asynchronously before allowing the app the enter

What is the difference between “dismiss” a modal and “close” a modal in Angular UI-Bootstrap?

ぃ、小莉子 提交于 2019-12-18 10:18:15
问题 What is the difference between "dismiss" a modal and "close" a modal? close(result) - a method that can be used to close a modal, passing a result dismiss(reason) - a method that can be used to dismiss a modal, passing a reason 回答1: The answer is in the documentation, right after the two lines you quoted: The open method returns a modal instance, an object with the following properties: close(result) - a method that can be used to close a modal, passing a result dismiss(reason) - a method

Add html link in anyone of ng-grid

筅森魡賤 提交于 2019-12-18 10:14:24
问题 I want to add link to ng-grid. Here is my code for your reference <html ng-app="myApp"> <head lang="en"> <meta charset="utf-8"> <title>Getting Started With ngGrid Example</title> <link href="../../Content/ng-grid.css" rel="stylesheet" type="text/css" /> <script src="../../Scripts/jquery-1.9.1.js" type="text/javascript"></script> <script src="../../Scripts/jquery-ui-1.8.20.js" type="text/javascript"></script> <script src="../../Scripts/angular.js" type="text/javascript"></script> <script src="

Angular ui bootstrap directive template missing

余生颓废 提交于 2019-12-18 10:13:12
问题 I'm currently testing out angular bootstrap-UI locally on my machine. When I try to recreate the example of accordion and dialog box. I get this error message in my console saying that template is missing. Example of error: 404 Not Found - localhost/angular/template/message.html When I look into ui-bootstrap-0.1.0.js the directive have a template URL . What's the purpose of the templateURL for the directive? Are those template suppose to be included when I download the whole angular bootstrap

AngularJS Google Map directive map instance

微笑、不失礼 提交于 2019-12-18 05:53:57
问题 I'm using http://angular-google-maps.org/ it's nice angular google maps library. But i want use map instance which is loaded not in angularjs context by something like this: $scope.map = { events: { tilesloaded: function (map) { $scope.$apply(function () { $scope.mapInstance = map; }); } } } Ok nice i have mapInstance and I CAN use it programmatically. But in application lifecycle this fire to late- so in other words I want to load whole directive (and get map instance) before other code-

ANGULAR-UI-ROUTER: Resolve state from URL

此生再无相见时 提交于 2019-12-18 04:08:29
问题 I'm making an app with dynamical states, and sometimes I need to resolve the state name from the url. e.g.: I have /dashboard/user/12268 and I need to get the state 'dashboard.user' . Is there any way to do this with the tools given by ui-router ? I can't find out how to do this right now... I'm making an app with dynamic module loading with requireJS. At first time there is no problem because user is sent to login state. After login, I use require to load only the states the user has access

Does AngularUI/Bootstrap support twitter-bootstrap 3?

守給你的承諾、 提交于 2019-12-18 03:36:34
问题 Dropdown menu not working in Angular-UI-Bootstrap? Using Bootstrap-3 CSS The following is the code. The link Click me for a dropdown shows up. But does not toggle on click. What is wrong? <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="css/bootstrap.min.css"> <script>function DropdownCtrl($scope) { $scope.items = [ "The first choice!", "And another choice for you.", "but wait! A third!" ]; } </script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs