Component is a special kind of directive that uses a simpler configuration which is suitable for a component-based application structure. A Component cannot do any DOM manipulation like directives (in the link and compile methods).
0
votes
0answers
12 views
Auto inject properties in Angular component to reduce boilerplate code
We are developing a large AngularJS (1.5) application which consists of a large number of constants that almost every Angular components' templates would use. Currently, we resort to manually assign ...
1
vote
0answers
22 views
AngularJS - Children component binded value not refreshed in ng-repeat
I have a parent component "transactionList" which get a list of banking transactions from an API and a children component "transactionItem" repeated for each transaction in this list.
I encountered ...
0
votes
0answers
21 views
ES6/AngularJs 1.5.5 directive/ngMessages Error: [$compile:ctreq] Controller 'ngMessages', required by directive 'ngMessage', can't be found
I am using angular.js 1.5.5 and ES6
My project uses gulp, webpack (I am mentioning this as I am not sure if this is causing any troubles around some exclusion/inclusion of angular-message.js in the ...
3
votes
3answers
43 views
Command a specific child component from parent in AngularJS
I'm using AngularJS 1.5.8.
I have "myParent" and "myChild" components.
In my view, i've 1 parent and 2 children inside that parent.
So my question is: I wanna have instances of children "myChild" ...
1
vote
2answers
22 views
Which is more appropriate for Modes? Broadcast vs Binding?
I currently have a parent component and several children component.
<parent-component>
<child-component ng-data="$ctrl.object.fieldone"></child-component>
<child-component ...
1
vote
2answers
31 views
How to keep a total between AngularJS Components in ngRepeat
Here's the problem - a limited number of licences can be assigned to users, when the available number is 0 no more can be assigned and other buttons will be disabled. Licences can removed and ...
0
votes
0answers
36 views
Replacing / overriding components in AngularJS using decorators
I have an angular_1.5 / Typescript project that follows ToddMotto style guide. Since I need to customize several components inside the modules (clients customizations), I have decided to structure the ...
0
votes
0answers
36 views
How to bind method from parent component to child in AngularJS
I'm creating simple parent-child components in AngularJS 1.5 but can't call method from my parent component in child component template through '&' binding:
Parent component:
module.component("...
0
votes
2answers
46 views
Using scope which can be shared between all components in Angular
I have simple controller with one method:
app.controller('MyApp', function($scope) {
$scope.myMethod() {...}
}
I have also many components for input fields (for example for text input, number ...
0
votes
1answer
44 views
How to test Angularjs route's resolve value on component?
I'm using [email protected] and resolve some resource at the route level for one of my component. The component works as expected but my test fails now.
Error
PhantomJS 2.1.1 (Linux 0.0.0) module ag....
-1
votes
1answer
22 views
Angular 1.5 - Component to retrieve html with data
I'm needing some help with Angular Component method.
I have a main html with its main controller, in which i have a JSON list of client data like:
clients: [{
"name": "John Jackson",
"...
1
vote
0answers
22 views
Bind an object between Controller and Component
I have a view where I use the component <cita-list citaFilterBinding="citaFilter"></cita-list>. The citaFilterBinding is the two way binding defined in the component and citaFilter is the ...
0
votes
1answer
47 views
angular-datatables - ng-repeat does not update datatable with new rows when $onChanges event called in component controller
I have made an angular-datatable component to be used in my project (using angular 1.5) and have bound the data it is populated with (the angular way) to an array of objects that gets updated in the ...
1
vote
2answers
93 views
AngularJS : ui-router components not showing
I am trying to write a simple angular application that uses angular ui-router to display components in my application.
I can get it to work using templates and controllers, but when I refactor to ...
0
votes
1answer
47 views
Is it possible to invoke a component on ng-click?
Previously there was a <div>, the contents of which i was toggling on ng-click. With components in Angular 1.5, i moved the contents of the <div>and created a component. I want to load ...
1
vote
1answer
21 views
How to check if output binding is given?
How to check if output binding is given?
Examplecode:
angular.module('tester', []);
angular.module('tester').component('test', {
template: '<h3></h3>',
bindings: {
callback ...
1
vote
1answer
39 views
How to test this component / template ? :)
I looking for any help with my problem about my UNITEST for AngularJS (and nvd3).
Indeed, when I try to make my chart I have an error.
It's like $ctrl.data and $ctrl.options were completly empty ...
...
0
votes
2answers
34 views
$http not injected into controller in a component after minification of JS file
angular.module("datasView",[])
.component("datasView",{
templateUrl : 'dataview/datasview.template.html',
controller : function control($http){
var self = this;
$http.get('src/...
2
votes
0answers
49 views
Directive cannot bound for component?
Update:
https://plnkr.co/edit/kbz5uimNZ6vKTiT9QB6a?p=preview is created for testing.
I have the following directive egFiles to handle the status of <input type="file" id="newFile" eg-files="model....
0
votes
0answers
24 views
Lower level ng-outlet get higher level ng-outlet param?
I'm using Angular 1.5 component and have the following $routeConfig code at top level.
$routeConfig: [....
{ path: '/details/:MyId/...', component: 'details', name: 'Details' },
And I can get ...
1
vote
3answers
43 views
Angular Component Tag Name to div
I totally hate to add tag names based on component names in my apps. I hate to do this:
<hero-detail hero="ctrl.hero"></hero-detail>
Isn’t it possible to use normal div tags instead? ...
1
vote
0answers
37 views
AngularJS 1.4 states to 1.5 components migration and how to approach component based architechure
There are good articles that explains the significance of components and how to migrate existing directive to components with angularJS 1.5. I am working on a medium sized project with ui-router and ...
1
vote
1answer
36 views
Angular 1.5 component not seeming to register
I am currently writing an app using Angular 1.5's .component() method. My component code is as follows:
(function () {
'use strict';
function controllerFn($state) {
console.log('...
1
vote
1answer
52 views
Passing multiple 'button' parameters to Angular component
I'm creating a reusable item picker component using Angular 1.5. The picker has a search field and a list of items to choose from. An example use case for the picker is a popup where the user ...
1
vote
2answers
42 views
How can I pass a function with argument to a component?
I want to pass a function from the parent component to the child component and give it an argument that has also been given from the parent component to the child. (showOrHideSub="item.showOrHideSub(...
0
votes
1answer
43 views
The parameters of functions magically match up in Angularjs?
I'm new to angualarjs and just start to build a page using angularjs 1.5 component. I'm trying to understand the following example from pluralsight. Does angularjs extended javascript with partial ...
1
vote
1answer
43 views
Very strange angular template render issue
I have the following code in index.html.
......
<my-test-app></my-test-app>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/...
-1
votes
1answer
68 views
Angular $compile for dynamic content
Using Angular 1.5, I want to use a generic "overlay" component to display other components within a modal. I'd like to pass in other components to be rendered within the overlay.
I thought I could ...
8
votes
2answers
249 views
$translate.instant does not translate values in AngularJS component when component starts
With Angular Translate and $translate.instant() method I built AngularJS's select component with automatic switching between languages:
<translated-select
elements="$ctrl.values"
current-value=...
0
votes
0answers
27 views
AngularJS component attributes not recognised in WebStorm
WebStorm 2016.2.3 does not seem to recognise AngularJS component attributes in the way that it does with directive attributes:
Is there a way to set up WebStorm to recognise component attributes?
1
vote
1answer
35 views
Issue to filter on table
I have a JSON data like this:
[
{
"id": 6488,
"type": "table",
"content": "<table> <tbody> <tr> <td>First</td> </tr> <tr> <td>Second</td> ...
2
votes
0answers
159 views
Ui-router 1.0.0.beta1 $transitions.onSuccess from $rootScope.on('$stateSuccess',
In my AngularJS (v. 1.5.x), I'm converting my controller-based states to component-based states with ui-router 1.0.0 (currently in beta 1).
I'm having troubles catching state changes, that where ...
0
votes
2answers
93 views
Angular 1.5.x - Issue with nested components
First of all, I'm using components.
I have this "parent" component:
(function() {
'use strict';
angular
.module('parentModule', [])
.component('parent', {
templateUrl: 'parent.tpl....
2
votes
1answer
57 views
how to select element inside angular1.5 component
For component, I can no longer refer to Elem or Attr like I used to in its father -- directive, by taking them as arguments inside link or post.
What is the best way to select element like I used to ...
3
votes
2answers
124 views
how to set header for each page using component in Angular 1.5
I started with Angular 1.5 component recently.
I am having various pages in my application. So I decided to create a <my-title> component which am using inside <my-header> component.
As ...
1
vote
1answer
49 views
reference form in angular component without scope
Currently I have this component definition:
var controller = ['$http', '$timeout', '$scope', function($http, $timeout, $scope) {
this.isInvalid = function() {
return $scope....
3
votes
1answer
260 views
D3.js 4 with AngularJS 1.5 ( Components or Directives ? )
i want to use D3.js v4 with AngularJS 1.5x
In the past i used .directives for the charts, but now i was wondering if it's possible use .components instead of directives, and if it's a good practice.
...
1
vote
0answers
45 views
Move from Server Based Application to Component Based SPA - Angular.js
Currently I have a Server Based Application running on MEAN Stack. I have node/express.js server and a backend API. Currently my structure is something like this:
Current Approach
Home Page
|...
0
votes
1answer
275 views
How to pass ngModel to AngularJS component without 2-way binding?
I have custom input as AngularJS 1.5 component with one-way data bindings and ngModel as two-way data binding:
return {
bindings: {
form: "<",
fieldName: "@",
minLength: "...
0
votes
0answers
37 views
Filter not applied after changing filter parameter in component
I am blocked with a problem with angular two way binding and filter. I am using a filter by a parameter, and after the parameter value is changed in another directive, the filter is not applied. Here ...
2
votes
2answers
178 views
Angular 1.5 Component Bindings: Check if Callback is Present
I've got a simple contactList component, which has 2 bindings: contacts and onRemove.
contacts is just an array of contacts to display
onRemove is a callback function
app
.component('contactList', ...
2
votes
1answer
40 views
Requiring directive's controller from component return an empty controller
So I have been trying to figure this out for the past 4 hours. Basically I have a parent directive which is being dynamically compiled into DOM
And within it I have a component which is being ...
0
votes
1answer
160 views
AngularJS one way binding component trigger 'Invalid controller bindings definition for directive'
I am getting this weird error when applying binding in an angular component:
Error: [$compile:iscp] Invalid controller bindings definition for directive 'workTimekeepingsDay'. Definition: {... ...
0
votes
0answers
25 views
How to access ngModelController in Angular1.5 components?
When I use angular.component() to create the brand new component that angular 1.5 provides, there's no link function, so the old way of injecting ngModelController or any other controllers doesn't ...
0
votes
1answer
58 views
Using the transclude clone attach function to add data accessible to transcluded content in Angular 1.5.8?
I'd like to make a few selected properties of my component's controller visible in the scope of content transcluded into that component. I'm trying to do that following Tero Parviainen's example for ...
0
votes
0answers
15 views
How do you set up an input for an AngularJS component where the input is a path to a view?
I am writing an AngularJS component that is essentially a container for other components. This container is located inside the main component of my app. Inside this container component, I have a ...
0
votes
2answers
124 views
How can I access the controller of a nested component from its parent?
I have three Angular 1.5 components: ReportFilter and ClientSelect, ZoneSelect.
ReportFilter has the two components inside of it
<!-- Report Filter -->
<div>
<client-select client=...
0
votes
2answers
88 views
Passing parent scope variables to ui-view component
I'm using angular-ui/ui-router and have directives/components with isolate scope defined to be rendered on state change.
$stateProvider
.state('about', {
url: '/about',
template: '<...
1
vote
2answers
176 views
Angular component relative templateUrl
I'm developing a modular angular application with I defined I folder path (constant : BASE_PATH : "path/to/folder") in angular-module-1 module. I want to re-used this constant in a angular component ...
0
votes
1answer
101 views
Set component TemplateURL to configured path
I am trying to set up a component with a templateURL that is a relative path given a configuration module. However, since it is outside of a controller, I can't figure out how to bring in the ...