angular-ui

Angular UI router not working

二次信任 提交于 2019-12-24 03:16:25
问题 **This js file for the ui router is proper or not.The error displaying is "Error: Unknown provider: $stateProvider from routerApp" this js files have been loaded in the Html file. ** var routerApp = angular.module('routerApp', ['ui.router']); routerApp.config(function($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise('/template1'); $stateProvider // HOME STATES AND NESTED VIEWS ======================================== .state('template1', { url: '/temp1', templateUrl:

How to create an empty group in ng-grid

爱⌒轻易说出口 提交于 2019-12-24 02:09:10
问题 I know that ng-grid uses aggregation to group rows[1], so it's not officially supported. Is there a nice workaround to create a header of aggregation without a row? Or way to use an empty row and don't display it? I need to aggregate users by group, but I have to list all groups without users too. Something like: Group 1 (users : 5) -User 1 -User 2 -User 3 -User 4 -User 5 Group 2 (users: 0) Group 3 (users: 1) - User 6 [1] How to set aggregation with grouping in ng-grid 来源: https:/

Showing a google map in angular-ui modal?

点点圈 提交于 2019-12-23 20:54:06
问题 Trying to load a simple google map within an angular-ui modal. However no luck. The data get's passed in fine, but nothing works in terms of the map... Please help. $modalInstance.opened.then(function() { var mapOptions = { center: new google.maps.LatLng(34.834442, -82.3686479), zoom: 8 }; new google.maps.Map(document.getElementById("eventMap"), mapOptions); }); Inside the modal html: <div class="row clearfix"> <div class="col-md-5" id="eventMap" style="display: block; height: 150px;"></div>

How do I get $index from an ng-repeat table to a modal controller?

孤街浪徒 提交于 2019-12-23 18:09:29
问题 I have a table of customer records created with angularjs bootstrap-ui and uses ng-repeat. At the end of each line in the table is a button to get more information about the customer. When the button is clicked a modal form pops with the information. my problem is whichever button I press I get the same customer number The problem is I need to get the value of $index to the following bit of code: $scope.selected = { customer: $scope.customers[0] }; The value of $index needs to replace the 0

In Angular ui-router child template not working

空扰寡人 提交于 2019-12-23 09:16:45
问题 I have registered a state test with a child .child1 , here parent ( test ) working fine . when i navigate to state test.child1 URL gets changed to #/test/child1 but the view remains same , child template not working angular.module('uiRouterSample.contacts', [ 'ui.router' ]) .config( [ '$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { $stateProvider .state('test',{ url:'/test', template:'<a ui-sref="test">Parent</a> -> <a ui-sref=".child1">child1</a>',

AngularUI monthpicker in popup shown as datepicker

隐身守侯 提交于 2019-12-23 05:16:56
问题 I'm trying to use the angular ui datepicker in monthpicker-mode as a popup, but it is shown as a datepicker. I've found a working example of the monthpicker as inline-picker here, but I need it as a popup. Here is a plunker of what I've tried, based on the official example. 回答1: i managed to fix it. http://plnkr.co/edit/tvte8r1EbjbeDZLn2ivq The most important thing was that there was an issue with the datepickerMode not being parsed correctly thus the datepicker starting in day-mode instead

Angularjs ui-grid row not resizing according to content

此生再无相见时 提交于 2019-12-23 04:33:50
问题 I have a ui-grid(v3.0.0-rc.20-8199eb5) cellTemplate which iterates over an array and prints out the names in the column. {name:'roles', cellTemplate: '<div ng-repeat="role in row.entity.roles>{{role.name}}</div>'} The row height is not big enough for the content and cuts it off. Row height will differ per entry depending on the amount of roles for the entry. Is there a way for the entire row to auto expand/resize according to the content in the row? 回答1: The solution that worked for me in the

Why ng-model is not defined?

╄→гoц情女王★ 提交于 2019-12-23 03:43:16
问题 I have three angular-ui-bootstrap typehead in a form <form> <div class="form-group"> <label for="fieldname" class="col-md-3 control-label">Name</label> <div class="col-md-6"> <input type="text" ng-model="newItem.customSelected" typeahead="name as name.name for name in members | filter:{name:$viewValue}" class="form-control" /> </div> </div> <div class="form-group"> <label for="fieldhname" class="col-md-3 control-label">House name</label> <div class="col-md-6"> <input type="text" ng-model=

How to Redraw Tables using Angular UI Tabs and UI Grid?

血红的双手。 提交于 2019-12-22 14:02:28
问题 I'm trying to migrate from jQuery Data Tables to Angular UI. My app uses the MySQL World schema and displays the data in 3 different tables. In jQuery, I'd 3 different pages, each launched from a home page. Here's a live example. In Angular, I created 3 tabs, clicking on each of which is supposed to reload the page with a new grid and populate it with data. Problem is, the grid gets displayed alright on page load with the content on the first tab. On clicking the other tabs, page goes empty

change angular ui-view inside ng-repeat

人走茶凉 提交于 2019-12-22 11:26:31
问题 I am using multiple named ui-views in a single controller. Everything is working as spected when name the ui-view in the html file with this code: <div class="box"> <div ui-view="selector"></div> <div ui-view="widget1"></div> <div ui-view="widget2"></div> <div ui-view="widget3"></div> <div ui-view="widget4"></div> </div> But when I want to load dynamically some of those views with a ng-repeat it does not update the information. <div class="widgets"> <div class="widget-container" ng-repeat=