Tagged Questions
AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Whatever(MV*) capability and reduce the amount of JavaScript needed to make web applications functional. These types of apps are also frequently known as Single-Page Applications.
1
vote
0answers
5 views
How do I make an angularJS directive that returns a different template based on the arguments sent to it?
In my first experiment, I have the following in my angulerJS template:
LoremIpsum: {{myObj.a}}
This works. The value of myObj.a is displayed because in my controller(myController), I have set ...
0
votes
1answer
10 views
How to set same value for all the textboxes in an unordered list in angular js?
Suppose i have 5 textboxes in a list.I enter text input in the first text box and click send. Now i want the input value entered to be showed in all the other textboxes in the list.
Following is my ...
0
votes
0answers
6 views
AngularJS tableExport.jquery.plugin can not export md-icon
I'm using tableExport.jquery.plugin to export a table to CSV (or PDF).
$scope.exportCsv = function (event) {
$('#userTable').tableExport({type:'csv'});
}
This export is not working for ...
0
votes
0answers
8 views
Laravel godaddy deployent file upload not working
I recently hosted on Godaddy and I got it working until my program tries to upload a file in laravel public folder.
The site is pretty much working but I can't upload a file using the post methods ...
0
votes
0answers
10 views
Only last radio button triggers $viewChangeListener
I have a set of radio buttons and a text input in a form. The text input has some validation applied that depends on the selected radio button.
HTML:
<form name="myForm" novalidate>
...
2
votes
2answers
42 views
How to make output data dynamic structure using AngularJS?
I'm new in angularJS and making a simple app, but I am finding it difficult to create output with dynamic data.
Here my html -
<div ng-app="MyApp">
<div ng-controller="TabsDemoCtrl">
...
1
vote
0answers
18 views
clone object with unique name in Angular
I'm new to Angular and looking for a way to make a clone button inside a list.
When I click this button, it will clone the object and add a number to the object name:
"new test" - will be changed to ...
1
vote
0answers
21 views
Angular2 not working giving error
I am developing a angular2 app in typescript.
here is my component login.ts
import {Component, View} from 'angular2/core';
import {FormBuilder, FORM_DIRECTIVES } from 'angular2/common';
...
0
votes
0answers
10 views
Link to html pages in ionic creator pages
I created a basic registration page using creator.ionic.io. I have downloaded , deployed in phone and came as expected.
I tried to explore the ionic generated html page and ended up with a question.
...
-1
votes
0answers
16 views
How to convert the current html page to image in ionic?
I tried with https://html2canvas.hertzen.com .
It it is taking only screenshot, but I need full page as an image.
Anyone has any idea about it?
I am creating one mobile app where i want to share ...
0
votes
2answers
33 views
how to Pass a object or a variable value from html script tag to the controller of angular
function showMessage(message) {
console.log("message type is" +message.type);
var response = document.getElementById('response');
var p = document.createElement('p');
p.style.wordWrap ...
-5
votes
1answer
32 views
As beginner, can I directly start learning AngularJS 2 by skipping AngularJS 1? [on hold]
I have Java background and want to learn AngularJS. Currently AngularJS 2 is still in development phase. I have read in many places that AngularJS 2 is complete rewrite and very different from Angular ...
0
votes
1answer
29 views
Angular ng-repeat filter not working
I have an array of FAQs that I receive from an ajax call as well as an separate array of FAQ Categories and I'm trying to do something where when you click on the category of that FAQ, only those that ...
1
vote
1answer
12 views
Django Localhost CORS not working
I have a local Django setup as follows
Django Rest Framework:localhost:8000
AngularJS frontend:local apache running on http://localservername
I've installed django-cors-headers and in my ...
6
votes
3answers
50 views
How to make global variables in angular
Ok guys so i have this problem where when you register you get to the Users page. And its suppose to say "Welcome " The username dosent show up for some reason... please help here is the plunkr:
...
0
votes
1answer
24 views
Data does not bind in view
In the below code,
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Controller</title>
<script ...
0
votes
0answers
8 views
breeze - help starting out
I am working on a c#/mvc/breeze/angular project in visual studio and I was asked to build entirely new functionality. Currently, we have a stored procedure set up and it's being used in an entirely ...
1
vote
0answers
10 views
Basic charting application: session storage, client side DB or JSON object in model?
I'm looking to validate my approach, and I have some questions too.
I'm working on an AngularJS application that displays charts: Bar, Line etc. The data is in a SQL database. The data is segregated ...
0
votes
0answers
22 views
Show a “Wrong username or password” message without reloading the view
I have this login form in my MVC5 site:
@using (Html.BeginForm("Authenticate", "Home", new { returnUrl = ViewBag.ReturnUrl }, FormMethod.Post))
{
<div class="modal-body">
...
2
votes
1answer
8 views
Ionic: promise goes to error even though it's it's resolved
I'm building my first ionic app and I have a problem with one of my promises.
The app talks with a REST api to login and register, the login part works but for the register part every time I fill in ...
0
votes
2answers
21 views
Adding AngularJs to a Bootstrap Theme
I am using a certain Bootstrap Theme purchased from ThemeForest for building a Web Application Project.
To be specific the theme referred to is - ...
0
votes
0answers
9 views
Google search bot doesn't see bound content in AngularJS app
I wrote a website using AngularJS and I'm having trouble getting google search bot to see it correctly. Google's search console shows that the bot only sees the double curlies (" {{ someData }}") and ...
0
votes
1answer
17 views
Does Pagination require it's own controller?
Sorry, angular newbie. I've been playing all day and can't get my pagination to respond to the data. There just doesn't seem to be any link between my directive and the content. Can I put the ...
1
vote
1answer
18 views
Can I set a parameter using ngRoute?
I am making an app that shows a list of items, and that list can then be refined by multiple filters. If I were to fetch a list of those options from the URL string, then that would allow visitors to ...
0
votes
0answers
8 views
Angular Material md-sidenav with md-content background color not displaying
I started messing with themes in Angular Material today but I noticed that when ever I call .dark() or .backgroundPalette('theme-text-here') my side menu md-sidenav doesn't full change background. A ...
0
votes
1answer
8 views
Angular UI Bootstrap scope variables in custom typeahead template
I am using UI Bootstrap's typeahead directive, and added my own popup template via typeahead-popup-template-url. In that template, I'd like to access scope variables from the parent template (i.e. the ...
0
votes
1answer
14 views
UserName is Unknown when you Register
The problem with this app I'm making is that when you register, it doesn't actually know the UserName; it says it's undefined. I checked by alerting the UserName as soon as you register and it says ...
-1
votes
2answers
10 views
Rails API always passes back HTML when called from an Angular service
I have created a simple Rails API that returns a list of posts. I know it works as I can hit my localhost and see the results displayed as JSON just fine
e.g. localhost:3000/1/posts/show_all.json
...
0
votes
1answer
12 views
Jasmine saying variable is undefined, when it gets defined in a function
This is my sp.js:
angular.module("SpPageApp", ["BaseApp"])
.controller("MainCtrl", ["$http", "$window", "BaseService", function($http, $window, BaseService) {
var self = this;
...
0
votes
0answers
8 views
Angular Backstretch
has anyone been able to make ngBackstretch work in Angular (I'm refering to this). jQuery Backstretch worked like a charm, but I can't get the angular version to work. In my case, the JS that renders ...
0
votes
2answers
13 views
Error: ng:areq - controllers in different files
I'm trying to separate every controller in my angular app, but I have this error:
23:51:38.389 "Error: [ng:areq] ...
0
votes
0answers
12 views
Initialize ng-admin module in a callback function
I'm trying to configure an ng-admin app. I'd like to load some data from a file before starting the configuration, however when I try to do this in a callback I get the following error:
Uncaught ...
1
vote
2answers
20 views
Selecting based on style attribute in angular
(How) is it possible to select elements based on their style attribute?
Thanks to the this question, we know it is impossible using pure css.
To enlight the issue, i give my concrete case: i want ...
1
vote
1answer
40 views
Reading a single value in a https request's JSON response
In my Angular I have code that requests a certain User and in that same function I want to catch the json result my server sends, and read one property of this json object.
Example Angular:
...
1
vote
1answer
9 views
JS function which executes on page load not being tracked by Jasmine spy
This is my test_sp.js:
describe('Controller: MainCtrl', function() {
var ctrl, mockBaseService;
beforeEach(function() {
mockBaseService = {
sps: 'x',
...
0
votes
2answers
29 views
Angular 2 - call function after change
I want to call the getCartSum() function after the addToCart(cartItem) added the item to the cart so I receive the new "total" value of the cart.
here is my Service:
public cartItems: any[] = [];
...
0
votes
1answer
8 views
Ionic dynamic tabs, ui-router navigation not loading proper views
I built a simple application that has a home page, a login page and a contacts page, based on the Ionic example on Codepen. My application is here. Login controller sets a $rootScope.user variable ...
0
votes
0answers
5 views
Can't get angular-socket-io to display messages
I have the following declarations in my app.js file:
(function () {
angular.module('medmart', [
'oc.lazyLoad',
'ui.bootstrap',
'ngFileUpload',
'ui.validate',
...
0
votes
1answer
23 views
Get date to display just month and year AngularJS, Firebase
I'm confused about how to get a date to display just a month and year using angularJS and Firebase.
I have converted a date to a string to be saved in Firebase.
Let me clarify that the date that is ...
0
votes
1answer
15 views
How to use $scope.$on in typescript and angular?
I am new to typescript and I'm trying to convert this angular controller to typescript but I'm having issues with the $scope.$on().
(function () {
'use strict';
...
0
votes
0answers
7 views
In Firebase how to set ng-model to an element more than one level deep
I have data that looks like this in Firebase:
"Employees" : {
"-K7PfwlSKrM_v-YF12uR" : {
"Jobs" : {
"-K6iYT9JsaoER4yxqXyi" : {
"rate" : "5"
}
},
...
0
votes
0answers
35 views
ng-include with template does not render data
I have two java script - one for controller and one for data service call.
On index page, I try to load tab with data from database returned results. It throws undefined for scope data which I can ...
0
votes
0answers
13 views
AngularJS. How to pass model to the custom xeditable directive?
I have directive, that allow to integrate ui.select with xeditable. This is my directive:
var Dashboard = angular.module('Dashboard');
Dashboard.directive('editableUiSelect', ...
0
votes
0answers
18 views
Passing derived class as a parameter from Angular js code while Making a call to WebApi Controller that has Parameter of Base Type
Below is my Angular js Front end Code
app.controller("assetController", ['$scope', '$http', function ($scope, $http) {
$scope.submit = function () {
var book = {
"Name": ...
0
votes
0answers
19 views
Angular js directive attribute not being attached to directive scope
I am trying to pass and argument to a directive via element attributes
below is a snippet:
directive
app.directive('bgFluct', function(){
var _ = {};
_.scope = {
data: "@ngData"
}
_.link ...
0
votes
1answer
11 views
Angular Template Not Showing with ng-hide
I have an angular directive that I'm using to place a button form. The template is hidden until the user needs to see it. It's a simple template that works by itself, but when I combine it into the ...
0
votes
0answers
8 views
CORS causing error for sending GCM
I am trying to send GCM through an AJAX request but it is failing. I am getting Preflight and Access-Origin errors. I have searched web a lot but couldn't find a resolution that will help me fix my ...
0
votes
0answers
7 views
unsupported media type with methods put and post angular js
Hi all,
I face a problem with angular js put and post method consuming rest web service in java
i have already added a header for angular script {'ContentType':'application/json'} but i'm always ...
1
vote
1answer
15 views
Angularjs orderBy based on multiple select menus
I'd like to make orderBy based on multiple select menu. for example:
Order :
<select ng-model="filterOrder">
<option value="+">- to +</option>
<option value="-">+ to ...
0
votes
0answers
11 views
Ionic/AngularJS display issues
I have a few issues and just wondering how to correct them.
1) I have data displaying in a list, but it's not displaying "WYSIWYG." I have "It's A New Day" but it displays the ' in it's as &8217 ...