351 questions
1
vote
4
answers
2k
views
How to include .css file of my component in angular js
I have included my component's .css file in this manner
`
angular.
module('home').
component('home', {
templateUrl: 'home/home.template.html',
styleUrls: 'home/home.component.css'
...
0
votes
1
answer
57
views
Targeting keydown events to an angularJS custom directive
I am working on a problem wherein I am required to pick-up keydown events (specifically ctrl+p and then point to a print function which already exists) on a certain custom directive and under certain ...
0
votes
1
answer
131
views
How can I access AngularJs component templateUrl variable inside of a controller $init fucntion?
Good morning everybody,
After lots of search about this subject, I could find how to get things bound, but I could not find a way to get the value from the component templateUrl.
Anyone knows how to ...
1
vote
1
answer
125
views
How to pass data with Angularjs
How do i pass data from the controller to a component to show to the user?
app.js
(function(angular) {
'use strict';
angular.module('app', []).controller('MainCtrl', function MainCtrl($scope, $...
1
vote
1
answer
188
views
AngularJS - How to change components controller dynamically?
I have an angularJS component and I manually set the url for a link.
But I want to change this url after blogposts is loaded in a different method.
HTML:
<a ng-href="{{ $ctrl.readMoreUrl }}&...
1
vote
0
answers
44
views
Unable to pass data to a controller inside a component in AngularJS
I have following component
componentsModule.component('detailComponent', {
templateUrl: 'detailTemplate.html',
scope: {},
bindings: {
textParam: '='
},
controller: ['$...
0
votes
1
answer
616
views
How to set scope for AngularJS component
Suppose I build an AngularJS component
function FooController($scope, $element, $attrs, $http) {
var ctrl = this;
ctrl.bar = "WIBBLE";
}
angular.module("app").component("foo", {
templateUrl:...
0
votes
1
answer
55
views
How to load values in ng-option of a component in AngularJS
I have created a component in AngularJS to load the values in a dropdownlist. However, I am not able to pass any values to the component and, in turn, to be loaded in the list through ng-option.
The ...
0
votes
1
answer
469
views
How do you use ng-model to take in data from a parent component in AngularJS (version 1.5.5)?
Below is an image of my code's output; I know how to display data passed down from parent components (i.e., 100), but I don't know how to display the parental data via ng-model (i.e., 100 isn't ...
0
votes
0
answers
16
views
AngularJS template not updating until browser interaction [duplicate]
I'm having hard time figuring this one out so I'll try to explain it as best as I can.
I have a service like so
export class Users {
constructor(private Api) {}
public async getUsers() {
...
0
votes
1
answer
168
views
How to use component's insideHTML in the component template?
I'm trying to learn about components. I have a component like this:
app.component('modal', {
templateUrl: 'components/modal.html',
bindings: {
show: '<',
title: '@',
},
...
0
votes
1
answer
216
views
Track by used in array of objects not allowing render on children changes
So I have an array structure like so:
const array = [
{
key: 'xxx1',
data: [
{
key: 'yyy1',
//...
...
0
votes
1
answer
851
views
Vscode Extension API search all files in workspace by content matches
update
I found it: provideWorkspaceSymbols
What is the API equivalent of the search menu in vscode? The vscode.worspace.findFiles()
Signature doesn't match the input fields I have in the menu of ...
0
votes
1
answer
210
views
Route to component with route resolve | AngularJS
After going through the article https://ui-router.github.io/guide/ng1/route-to-component, we tried to use resolve in AngularJS. But unfortunately,we received the error as:
Unknown provider: ...
0
votes
1
answer
172
views
Print the div content using AngularJS
We were trying to print the content using AngularJS.We tried to bind the elements using ng-bind yet the data is not getting displayed in the document.We have attached the screenshot below and kindly ...