Vote count: 0 I am having trouble with my Angular JS ui-router and every question I have found on here shows a solutions I have already tried. In my ui-view-tag my actual template is not displayed. This is my app.js angular.module('myApp', ['ui.router']) .config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { $stateProvider .state('home', { url: '/', templateUrl: 'home.html', controller: 'MainCtrl' }) $urlRouterProvider.otherwise('home'); }]) Thank you very much everybody, I would really appreciate a short feedback on that. asked 46 secs agopatrick Let's block ads! بخوانید...
ادامه مطلبVote count: 0 localhost:5555/dashboard Currently I am in dashboard component. In view I have a grid that will having link button will move to another component city component. So I need to pass state id dynamically from view. localhost:5555/dashboard/states/1/cities localhost:5555/dashboard/states/2/cities localhost:5555/dashboard/states/3/cities I am trying with this code in my component in angular 2.0.0-rc.1 This is giving me dashboard URL http://localhost:5555/dashboard not city URL http://localhost:5555/dashboard/states/3/cities Any Help...... asked 22 secs agoKrushna Mohanta Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I got service in angular with defined function: angular.module('services-data-service', []).factory('DataService', function ($resource) { retu $resource('rest/data/:method/', {}, { dictionary:{method:'GET', params:{method:'data1'}, isArray:false} ... }); }); I fetch data in controller by simply calling: ReportsService.data1(), but after adding new line: city:{method:'GET', params:{method:'city'}, isArray:false} when I call it from controller, I get nothing, there is no response in network log, but when I try to obtain webservice manually by typing URL in browser it works. Any ideas, why I can't call web service from angular's controller? asked 46 secs agoIwnow Let's block ads! ...
ادامه مطلبVote count: 0 How do you track progress in Angular 2 services? I'm told that we use services to talk to the database or other data repository. while the query is in execution, I'd like to be able to put up a progress bar on the UI. My question. How do you tract percent complete? Thanks asked 32 secs agoarcee123 This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting....
ادامه مطلبVote count: 0 What I am trying to do is create a directive which compares two password inputs and triggers invalid if either changes. I have found a few examples and have tried a few and have combined a few in my own attempts. However, I have only been able to toggle the validity with $setValidity when the confirm password field changes. When you change the password field it doesn't trigger the invalidity of the comparison. Here's my directive: app.directive("passwordVerify", function() { retu { require: "ngModel", scope: { passwordVerify: '=', }, link: function(scope, element, attrs, ctrl) { scope.$watch(function() { var combined; if (scope.passwordVerify || ctrl.$viewValue) { combined = sc...
ادامه مطلبVote count: 0 My problem is pretty simple but elusive in nature. When you will load the index.php, (as localhost using xampp) you will be presented with a simple form. Now there are multiple elements on this form, and it's still a work in progress, so the possibility of multiple bugs is plausible. However, there's this one bug that's really aoying. THE PROBLEM: On changing the Due Date element, the content of the following input boxes changes due to the fact that they're bind with it. Now it won't matter how many times you change the due date, because every time the value in the fields will change accordingly, Thanks to angularjs. The BUG creeps in when you change the value of an input field...
ادامه مطلبVote count: 0 I need to do two way of binding between parent and grandchild. Thus, I try to do two-way of binding between child and other two. Some think like that GrandChild Child Parent But it does not work as I expect. This is my grandchild: ... export class FullScreenableSvgComponent { @Input() isFullScreen: Boolean; @Output() isFullScreenChange: EventEmitter; constructor() { this.isFullScreen = this.isFullScreen || false; this.isFullScreenChange = new EventEmitter(); } ... } This is my child: ... export class VisualizationComponent implements OnChanges, OnInit { @Input() isFullScreen: Boolean; @Output() isFullScreenChange: EventEmitter; constructor(private elementRef: ElementRef) { this...
ادامه مطلبVote count: 0 In Angular I'm having trouble animating the transition of an objects position after an Angular filter completes. I've created a codepen to demo the functionality. Now the opacity transitions to fadeinout those objects work fine once the filter is run but then they jump into their new position, and I would much rather prefer to apply a smooth transition to this as well. ul.nav li { transition: all ease 2s ; } .animate.ng-enter, .animate.ng-leave { transition: all 500ms; } .animate.ng-leave.animate.ng-leave-active, .animate.ng-enter { opacity: 0; width: 0px; height: 0px; } .animate.ng-enter.ng-enter-active, .animate.ng-leave { opacity: 1; width: 150px; height: 30px; } Any ideas? ...
ادامه مطلبVote count: 0 Could you point me to the right direction what I should look up in order to understand the following code about trigger: "=trigger" app.module.directive('messageModal', function ($compile) { retu { scope: { trigger: "=trigger", }, controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element, $attrs, $timeout) { $scope.trigger = function(title, message, modal_class, color, auto_hide){ What I understand is that by having scope: {}, the directive 'messageModal'has created a brand new scope object. BUT what does trigger: "=trigger" do? What about the $scope.trigger? Please I need some directions on what I should lea in order to understand what the directive d...
ادامه مطلبVote count: 0 I'm trying to do a really simple translate pipe for angular2. But I might be wrong how to promise work. The idea is to get the language parameter from a async service which call a doc in PouchDB. Fyi, the data are organised like this: { title: { fr: "text in french", en : "text in english", ... } The retu inside the promise doesn't work. The html template is empty. I don't get why. @Pipe({name: 'translate'}) export class Translate { lang:any; constructor(private interfaceService: Interface){} transform(obj) { this.interfaceService.getParams().then((data) => { retu obj[data.language] }).catch((error) => { console.log(error); }); } } If I put the retu outside of the promise, it w...
ادامه مطلبVote count: 0 I have a mobile app which is trying to authenticate before accessing APIs from a symfony backend. Here is how it is done : the app use a route like oauth/v2/token to which it gives the useame, password and other stuffs like client_id and client_secret. And the oauth retus a auth_token, refresh_token and other stuff. But here is the issue. Whenever I try to access to an API in the mobile (i'm testing via browser by using the command ionic serve) it redirects me to the web authentication page and my API retus in the console html code for that authentication page. Does someone might know where I get it wrong. For info whenever I make an api call I inject the token I get from authe...
ادامه مطلبVote count: 0 I am trying to integrate Angular UI Bootstrap Datepicker. I installed packages for bootstrap, angular-ui-bootstrap and jquery. When I load the app I get the error ui-bootstrap-tpls.js:7341 Uncaught TypeError: angular.$$csp is not a function My index.html is My AngularJS App view1 view2 Angular seed app: v asked 10 secs agoIsadora This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting....
ادامه مطلبVote count: 0 I am developing ionic2/angular2 app for Android mobile. I want to provide option to user to choose language option in the login page. Is there any way to do the app level Inteationalization using ionic2/angular2? I have seen so many examples with device level Inteationalization. asked 45 secs agovishnu This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting....
ادامه مطلبVote count: 0 I am very interested in AngularJs but I heard AngularJs is not good for SEO then why should we use it? I know that it has great features, performance and fast to develop applications but almost all businesses need perfect SEO. If it is not good in SEO then why people would choose AngularJS? asked 48 secs agouser2899728 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 i am trying to store form data into database through angularjs but it is not storing into database, don't know what i am doing wrong? my html form -- Select Activity Type -- Ruing Walking Cycling my angularjs controller app.controller("NewChallengesController", ["$http", "$scope", "authenticationSvc", function ($http, $scope, authenticationSvc) { //alert("hello, inside New Challenge Controller"); var token = authenticationSvc.getUserInfo(); var config = { headers: { 'h5cAuthToken': token.accessToken, 'Accept': 'application/json;odata=verbose' } }; $scope.newChallenge = function () { var data = { "challengeName": $scope.challengeName, "selectedRewardId": "283081", "startDate": $...
ادامه مطلبVote count: 0 I am trying to achieve page navigation (Next and back button) using Angular UI-route. I am changing the state from controller and it is getting changed on view as well but is not redirecting me to that page. I have achieved it using button click using $state.go('stateName') but I want use Bootstrap page for this . here is my code $stateProvider .state('settings', { url: '/settings', templateUrl: 'templates/settings.html' }) .state('settings.profile', { url: '/profile', templateUrl: 'templates/profile.html', controller: 'ProfileController' }) .state('settings.account', { url: '/account', templateUrl: 'templates/account.html', controller: 'AccountController' }) .state('settings.p...
ادامه مطلبVote count: 0 I want above expression to be executed to select the value of value attribute. How can I do that in angularJs? Is there any directive for that? flag is a boolean value here. Please suggest the solution. asked 54 secs agoSiddharth Shah Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Here are my custom filters: This filter removes records with the same property: .filter('distinct', function () { //filter, which removes records with same property retu function (data, keyname) { var output = [], keys = []; angular.forEach(data, function (item) { var key = item[keyname]; if (keys.indexOf(key) === -1) { //If not already existing keys.push(key); output.push(item); } }); retu output; } }) All Levels {{class.level}} This filter replaces ids from an objects with a corresponding value from another array. (I am trying to do something like an 'Equijoin' from SQL in AngularJS. If there is a better way let me know :) ) .filter('replaceId', function () { //filter, which ...
ادامه مطلبVote count: 0 In my angular template I'm creating a dropdown menu using angular-ui, I need to disable some of the list items based on a property of the "company" object defined in the ng-repeat. I already tried the disabled tag or the ng-disabled directive but without success. How can i achieve that? My current code: {{companyDescr}} {{company.address}} Any help would be greatly appreciated! asked 23 secs agoSMarello Let's block ads! بخوانید...
ادامه مطلبVote count: 0 How to handle events (like $rootScope or socket events) in an Angular controller correctly? I'm facing the problem that my controllers aren't destroyed, which cause some problems when it comes to listening to specific events. To make it clear what I mean here's a plunker: http://plnkr.co/edit/CkXKUnpUdsbnZEjq8zLy?p=preview Triggering the rootscope event (by clicking on the button) in the first place works as intended: just one event is fetched. But navigating to Route 2 and triggering the rootscope event again shows my problem; the event is fetched twice, since (at least that's my guess) both controllers are active now. Every route switch causes an additional event listener. Ho...
ادامه مطلب