Unexpected Token <
Posted: 28 Mar 2016, 01:09
Just discovered this toolset. Looks very nice. Trying to implement into an Angular2 project. Currently on Angular2-Beta12 and PrimeNG 0.9.
Anytime I put a:
command in I get this error:
I have the Import statement in the component
I have the Stylesheets and javascript in the index.html file as well as the SystemJS Code:
So am I doing something wrong or is it a bug somewhere?
Thanks in advance.
Anytime I put a:
Code: Select all
directives: [Button],
IF I comment it out then the app works, but no Prime Controls.angular2-polyfills.js:332 Error: SyntaxError: Unexpected token <
Evaluating http://localhost:3000/node_modules/primeng/primeng
Error loading http://localhost:3000/app/main.js
I have the Import statement in the component
Code: Select all
import {Component, Input, Output, EventEmitter } from 'angular2/core';
import {Button, InputText} from 'primeng/primeng';
import {SalaryAdj} from './salaryAdjClass';
import {NgForm} from 'angular2/common';
import {Employee} from './employeeClass';
import {SalaryHistory} from './SalaryHistoryClass';
import {EmployeeService} from './employeeService';
@Component({
selector: 'SalAdjCmp',
templateUrl: './app/SalaryAdjustmentCmp.html',
directives: [Button],
providers: [EmployeeService],
})
Code: Select all
<!-- PrimeNG -->
<link rel="stylesheet" type="text/css" href="node_modules/primeui/themes/delta/theme.css" />
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="node_modules/primeui/primeui-ng-all.css" />
<!-- PrimeNG -->
<script src="node_modules/primeui/primeui-ng-all.js"></script>
<!-- 2. Configure SystemJS -->
<script>
System.config({
map: { 'rxjs': 'node_modules/rxjs',
'primeng': 'node_modules/primeng'},
packages: {
Thanks in advance.