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).
1
vote
1answer
31 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
30 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
19 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....
1
vote
1answer
25 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
79 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
19 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....
2
votes
1answer
51 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
19 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
62 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
29 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
37 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
31 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
42 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
9 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
26 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
13 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
40 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
57 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
44 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
37 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 ...
3
votes
1answer
70 views
Pass bindings to TemplateUrl in Angular's component
My component object looks like this:
var options = {
bindings: {
title: '<',
rows: '<'
},
controller: registers,
templateUrl: function ($element, $attrs) {
...
1
vote
0answers
21 views
Using Inheritance with AngularJS Components
I am using AngularJS components in anticipation of eventually moving to Angular2. I have a component (Component1) that is essentially a dropdown with a few specific inputs and outputs. I have ...
0
votes
0answers
32 views
Angular JS - Resolve object can't retrieve in Controller
I am having some trouble injecting the resolved object into controller. I am using AngularJS 1.5 Component based + ES6 syntax
heres the routes.js file:
I want to get the resolved object garage and ...
0
votes
0answers
35 views
AngularjS Component inject service for building component object?
I have a directive in AngularJS 1.4:
app.directive('queryEditor', ['Util', function(Util) {
return {
scope: { .... },
restrict: 'E',
templateUrl: Util.templatePathFor('/templates/...
0
votes
1answer
34 views
How to toggle a class on the component-DOM-node
I'm currently rewriting some older directives to the new component-syntax. One of my directives needs to toggle a class on the DOMnode.
<my-directive ng-class="$ctrl.getClassList()">
<!-...
0
votes
0answers
49 views
Angular 1.5 clear child components from parent
Angular 1.5 application with a user input form. We have a custom shared component called a combo-box. It's essentially a drop-down selector but has css classes and a number of bells and whistles for ...
0
votes
2answers
52 views
Use resolve with angularjs component
I am trying to resolve a list of customers prior to rendering a page.
Here is the state provider reference, where I have the resolve methods.
angular.module('app')
.config(($stateProvider) => {
...
0
votes
1answer
24 views
Referencing Angular form with 1.5
I have an angular directive (1.4) I'm switching over to the component syntax (1.5). The existing code calls the form.$setPristine() if a form reset button is clicked. When I switch it to a component ...
0
votes
1answer
56 views
Require parent component in directive AngularJS 1.5
How to require a Component in a Directive? You can require the controller of a directive in another directive and you can require a component in another component. But how to require a components ...
0
votes
1answer
19 views
AngularJs 1.5 - unable to communicate between two components via parent component
I have 3 components in the following order: 1 parent component with 2 child components. I need to run a function within the parent component, by initiating it from either of the two child components.
...
0
votes
1answer
30 views
Angularjs pass simple string to component
I'm desperately trying to pass a simple string to an AngularJS component,
I have the following angularJS component:
async-typeahead.componenet.js:
angular.module('asyncTypeahead').component('...
0
votes
2answers
27 views
Set global constants in AngularJs
I am trying to create constants js file in angular js for an application. I am using below code to implement constants for entire application. It's working fine.
<code>
// app.js
angular....
0
votes
2answers
526 views
Angular 1.5 components with ui-router resolve : Unknown provider
I'm facing an issue with converting controllers to components preparing my application for Angular 2, but the problem the migration is not going well, I have the ui-router to route between states and ...
7
votes
1answer
100 views
How to Identify whether a Angular2 component is completely loaded ( including ViewChilds ) when there is ngIf in template
Is it possible to Identify whether a Angular2 component (here AppComponent) is completely loaded ( including ViewChilds ) when there ngIf in template which conditionally loads the child.
Reference: ...
0
votes
0answers
47 views
How to Implement $compile(..)($scope) service inside angular 1.5 component, where $scope injectable is removed?
I am currently using Angular 1.4, in the process to shift to angular 1.5, I am rewriting all the controllers into component style and removing $scope injectables inside the controller. In one of the ...
0
votes
1answer
45 views
How to defined a new variable in AngularJS component
I have trying to create a AngularJS component corresponding to a progress bar. Here is a JSFiddle created for this question http://jsfiddle.net/Lvc0u55v/6725/
Here is my application and component ...
1
vote
1answer
42 views
Where should I place code to be used across components/controllers for an AngularJS app?
Should it be associated with the app module? Should it be a component or just a controller? Basically what I am trying to achieve is a common layout across all pages within which I can place or remove ...
4
votes
2answers
52 views
Template not loading under component design
I am trying to make a single page application while using components since my company will be moving to using components in the future and I am trying to follow the angular-phonecat tutorial. The ...
0
votes
1answer
19 views
Drag and drop Angular 1.x directive/component and parent scope
Let's say my grandparent component/directive's scope variable is declared like this: $scope.g = { // methods here };
In each of my nested component's/directive's controllers, I'm referring to that ...
0
votes
0answers
31 views
Angular modal component
In the process of studying the angular implement widget modal window, but I do not quite understand how to do it correctly.
It is planned to write as a service, but something goes wrong.
The component ...
0
votes
0answers
42 views
Removing a AngularJS component from the DOM and from his parent on click
i'm trying to show a list of users in AngularJS
Each one would be user with a custom component element
The components would have TWO buttons
First one have to remove the component element from the ...
1
vote
0answers
50 views
Angular 1.5 component tree deep transclusion
I'm trying to figure out a way to use transclusion to provide a template for a deeply-nested component, from the top-level ancestor component. The idea being this component tree can be reused, but the ...
1
vote
1answer
59 views
Angular Components: What is the difference between one-way and attribute bindings?
I've been building a few angular components and was wondering what are the practical difference between the one-way ("<") and attribute ("@") bindings?
Are there scenarios where one is ...
0
votes
1answer
20 views
AngularJS temlateUrl broken in component after Refactor ->Move in WebStorm
I am using WebStorm to do component-based AngularJS development.
As we are having multiple modules used to assemble multiple application variants it happens quite often that I am moving an angular ...
1
vote
1answer
130 views
Angular 1.5 unit test controller that requires parent component's controller
I'm trying to unit test a (child) controller of an AngularJS 1.5 (with Webpack) component that requires a parent component and a controller from another module.
Child controller structure:
function ...
0
votes
0answers
277 views
How to use angular 1.5 components with ui-router states
Right now, angular ui-router project didn't have anything explicit about angular 1.5 components.
My project requirement is to use nested states and I want to use angular 1.5 components to easily ...
1
vote
1answer
70 views
AngularJS 1.5 Components printed before gets the controller values
I've a parent view with a parent controller, with 2 children component, each one with his own controller.
Something like this
<section> // Main Controller
<table-users listusers="...
1
vote
3answers
158 views
Angular component bindings objects not intialised
I am using angular 1.5 components in my project . In my component i always get undefined for the object data.
I hope the $ctrl.products are not initialized before calling the product-result component....
0
votes
2answers
21 views
Include angular component inside of another app
I have an angular component built with angular 1.5.*. I want to include this component inside of an existing angular application. Is that possible? Can two-way binding be accomplished this way?
I ...
2
votes
1answer
69 views
How To Inject Service Into Angular 1.5 Component (No Typescript)
I have a service that I want to pass into a Component in Angular 1.5. I'm not using Gulp or TypeScript.
This is the service:
(function() {'use strict';
angular.module('flavorApplication')
....