## scroll to a section and highlight the menu

Hi everyone I’m working on angular 2 and i was trying to do method which is, when I scroll the body and I get to section 1 it should highlight the menu bar, so on. please can anyone help me with this, thank you addEventScrolling(){ document.getElementById(‘manufact’).onscroll = () => { } } <nav> <ng-container *ngIf=”manufact”> <ng-container *ngFor=”let key of Object.keys(manufact); let i = index”> <li>car</li> <li>bike</li> <li>van</li> <li>trank</li> <li>boat</li> </ng-container> </ng-container> <br> <div class=”car” id=”sect1″>simply […]

## AngularJS uibModal is invisible

I created a uibModal that should open when a button is pressed. And as far as I can see in the browser Inspector it opens. The problem is, it is invisible. If I change the .fade opacity through the Browser from 0 to 1 the Modal is displayed. But that does not help me for my code. in the index.html I have following included. <link rel=”stylesheet” href=”css/bootstrap.css”> <script src=”bower_components/angular/angular.js”></script> <script src=”bower_components/angular-route/angular-route.js”></script> <script src=”bower_components/angular-animate/angular-animate.js”></script> <script src=”bower_components/angular-bootstrap/ui-bootstrap-tpls.js”></script> […]

## Cannot insert multiple records at a time with php and angular2

I’m trying to insert multiple records from selected checkboxes to mysql db with php. What is happening is after i post and go to check the db, i find all the records inserted in one line instead of each making a unique insertion. Below is the data is post in an array [“A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”,”A”,”B”,”C”,”C”,”B”,”A”,”D”,”B”,”D”,”A”,”A”,”A”,”B”,”A”,”B”,”B”,”B”,”C”,”B”,”B”,”A”,”A”,”A”,”C”,”B”,”B”,”D”,”C”,”C”,”C”,”B”,”D”,”D”,”D”,”D”,”D”,”C”,”D”,”C”,”A”] PHP <?php require_once(‘../Connections/catchapp.php’); ?> <?php $data= json_decode(file_get_contents(“php://input”));$uanswer= mysql_real_escape_string($data->useranswer); foreach ((array)$uanswer as $item) { mysql_select_db($database_catchapp, $catchapp);$insertSQL = (“INSERT INTO user_answers […]

## filtering in an ng-repeat from JSON response

I’ve got a question about filtering within a ng-repeat. But this isn’t a simple question since I’m not really having a problem that needs a solution. In this case, i’m looking for the best possible answer that doesn’t require a lot of code but still does the trick as to how I want it to. It will become more clear in my description. a short introduction: So I’m currently working on a shopping application. The […]

## How to validate these special characters in AngularJS?

What is an appropriate ng-pattern for disallowing /:*?”<>| I’ve tried so many different approaches. Source: AngularJS

## Null is not an object (evaluating ‘a.isConnected’) using Angular TestBed against Phantom

I’m using PhantomJS 2.1.1 and I have the following TestBed setup: TestBed.configureTestingModule({ declarations: [ MyComponent ], imports: [ InputModule, PanelModule, ReactiveFormsModule, RouterTestingModule, OtherComponentModule ], providers: [ { provide: ActivatedRoute, useValue: activatedRoute } ] }) .overrideModule(SidebarModule, { add: { imports: [ StoreModule.provideStore(reducer) ] } }) .compileComponents(); fixture = TestBed.createComponent(MyComponent); component = fixture.componentInstance; fixture.detectChanges(); When the component is been created I get the following issue: Failed: null is not an object (evaluating ‘a.isConnected’) J appendChild insertRootElement createComponent […]

## Controller is not registered exception when using SystemJS with Typescript in angular JS

I am trying to implement a page using typescript in AngularJS, but I am not sure what mistake I am doing in integrating the controller to the angular. Based on my understanding, controller IIFE is not getting executed though I have specified the System import in the HTML file. Please find the following files Sample.ts file import * as angular from “angular”; export class Sample{ constructor(nme: string) { this.name = nme; } public name: string; […]

## Running "ng serve" with angular CLI first time wont compile right and gives an error

So I am trying to start my first project in angular. And every time it won’t compile like it won’t do ng serve and complete it without an error, it is hard to explain I hope you forgive that with me on that. Basically, Im running node-v9.1.0 and npm-v5.5.1 on Windows 10 Pro 64bit Commands I used is npm install -g @angular/cli & ng new ngvic and the cd into the folder and using ng […]

## Modal not popping up in bootstrap.When I clicked "Learn more" modal is not opening up ?Can someone tell me where i went wrong

I have provided the code below and Plunkr link as well.Modal doesn’t display properly when I click the “Learn more” button the issue araises.Can someone tell me where exactly I went wrong.The details are provided below.Well, how about adding more details. Like, what are you trying to accomplish, how are you doing it, what difficulties you have found with the approach, another approaches you have tried, etc. In summary, without code isn’t a good question […]