single-page-application

Angular JS thowing error even though controller is available

流过昼夜 提交于 2019-12-11 09:42:34
问题 I am new to Angular JS and I am trying some examples... But I get a very weird exception when I try to load my app... Here is my angular JS code: <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script> <script src="JS/Controllers.js"></script> <body ng-app="myapp"> <div ng-controller="HelloController"> <h2>Hello {{helloTo.title}} !</h2> </div> <div ng-controller="MyController" > <span ng-show="myData.showIt"></span> <span ng-hide="myData.showIt"></span> <

KnockoutJS “with” binding before model is available

独自空忆成欢 提交于 2019-12-11 09:07:02
问题 I have an ASP.NET MVC4 SPA web application using KnockoutJS, which is a bit awkward because, as I understand it, when the page initially loads in an SPA there is generally no data until an AJAX call retrieves it. When I try to bind all sorts of data inside a block with an attribute like data-bind="with: myData" , the whole DOM inside that node is emptied out until myData becomes valid, which makes me nervous if certain script might be relying on having those elements available to attach

Parse data security and relationships

人盡茶涼 提交于 2019-12-11 08:25:55
问题 I'm trying to determine the best approach for the following scenario using Parse and a Backbone front end. I want to build a discussion thread where two or more users, of various roles (ie: member, admin, etc), are able to communicate by posting simple messages which will appear in a chronological list. The messages would appear with the users name, users photo, the date it was posted and the message content. My initial instinct was to create a Message class in Parse with the following fields

Azure AD connect multiple apps to single Web API

一个人想着一个人 提交于 2019-12-11 07:48:01
问题 I have a Web API written using asp.net core. This API will be used to communicate with several other services registered in AAD, which all could be made using different technologies like an MVC application written in asp.net core or a single page application written in Vue.JS. The latter is causing me issues as the SPA won't be run by an application web server and rather something like nginx or apache and therefor won't be able to use a client secret. I have added API permissions for my API

Breeze JS: Is there a way to query entities from data.results?

痴心易碎 提交于 2019-12-11 07:45:22
问题 I have a Breeze web api controller, with methods that accept parameters and do some work, filtering, sorting, etc, on the server. On the querySucceeded, I'd like to do further querying to data.results. Is there a way to accomplish this? I got this working by exporting/importing data.results to a local manager, and do the projection from there. The projection is needed in order to use the observable collection in a vendor grid control. var query = datacontext.EntityQuery.from(

Advanced manipulating DOM in AngularJS directive

若如初见. 提交于 2019-12-11 06:16:12
问题 I'm resolving rights in AngularJS application... I would like to use custom directive for resolving what user can see by his role. It's only client side design. If user entry on page what he hasn't access, server return 403 for all requests for data from this page. My actual solution looks like this: <li ng-repeat="menuItem in navigationItems" class='{{menuItem.css}}' restrict-access="menuItem.restrict"> <a href="#/{{menuItem.url}}"> <div class="label"> <span class="icon"> <span class="title"

Why is my SPA, which is calling my WebAPI, using Azure Active Directory, receiving “Authorization has been denied for this request.”?

孤人 提交于 2019-12-11 06:06:57
问题 I have a local SPA client (based on https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-javascript-spa) Then there is a WebAPI service. (based on https://github.com/Azure-Samples/active-directory-dotnet-native-desktop) The service should only respond to authenticated and authorized clients. To this end I am using Azure active directory (AD). Here a picture of how the 3 parts are linked. Numbers refer to the order of the calls. Although Azure AD seems to return an

Why is Bing crawler not fetching the dynamic content of my angular web page?

白昼怎懂夜的黑 提交于 2019-12-11 05:09:14
问题 I got my SPA website (based on Node/Express/Mongo/Angular X) up and running. I created a sitemap.xml and submitted to Microsoft Bing, and from the server log, I see they started crawling. However, I noticed the page URL is called, but not the associated API for that page. So, basically it's just indexing the static skeleton of each page, not the dynamic real content. I googled and see people saying "google can't index dynamic content" as suggested in this article. However, I also see other

best practise in SPA: hash vs questionmark url

南笙酒味 提交于 2019-12-11 04:27:42
问题 I have a single page app. and just realized that if I replace my location.hash approach to change state with a query approach I would simplify the app. and get the history (back button) for free. (rather than listening to onhashchange events) So my urls would move from http://.../spa.html#state={...} http://.../spa.html?state={...} The disadvantage is that moving from '#' to '?' implies that the page gets reloaded (which is fine because the state is retrievable) but, although I can see it, it

Breeze isPartial

戏子无情 提交于 2019-12-11 03:10:09
问题 Currently playing with John Papa's Hot Towel, I am currently having a strange error: TypeError: Object [object Object] has no method 'isPartial' I have been looking into this isPartial thing but without success. All I've done is create a new kind of entity. I don't know if I should provide more information for this problem. Please help! Thanks :) Here's the full error below: "TypeError: Object [object Object] has no method 'isPartial' at proto.setProperty (http://localhost:13763/scripts