Waypoint不是Angularjs 5中的函数错误

时间:2018-07-03 06:33:09

标签: jquery angularjs jquery-ui frontend

Waypoint已通过public class DeviceListAdapter extends ArrayAdapter<BluetoothDevice> { private LayoutInflater mLayoutInflater; private ArrayList<BluetoothDevice> mDevices; private int mViewResourceId; public DeviceListAdapter(Context context, int tvResourceId, ArrayList<BluetoothDevice> devices){ super(context, tvResourceId,devices); this.mDevices = devices; mLayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); mViewResourceId = tvResourceId; } public View getView(int position, View convertView, ViewGroup parent) { convertView = mLayoutInflater.inflate(mViewResourceId, null); BluetoothDevice device = mDevices.get(position); if (device != null) { TextView deviceName = (TextView) convertView.findViewById(R.id.tvDeviceName); TextView deviceAdress = (TextView) convertView.findViewById(R.id.tvDeviceAddress); if (deviceName != null) { deviceName.setText(device.getName()); } if (deviceAdress != null) { deviceAdress.setText(device.getAddress()); } } return convertView; } } 安装,我已在npm install waypoint中添加了它:

angular-cli.json

在我的"scripts": ["../node_modules/waypoints/lib/jquery.waypoints.min.js"], 中,我添加了以下内容:

compontent.ts

此过程完成后,我遇到了两个错误:

  

未捕获的TypeError:无法读取未定义的属性“ each”。

  

zone.js:192未捕获的TypeError:$(...)。waypoint不是函数

我是Angular的新手。使用航点进行部分导航的正确方法是什么?

0 个答案:

没有答案