我有这个结构:
我想参考" logo.svg"在我的组件中。 像这样:
public class ConnectAccept
{
private static final int PORT = 46583;
private static CountDownLatch latch = new CountDownLatch(1);
public static void runClient() throws Exception
{
latch.await();
Socket socket = new Socket();
System.out.println("Client: connecting...");
long t0 = System.currentTimeMillis();
socket.connect(new InetSocketAddress("127.0.0.1", PORT));
long t1 = System.currentTimeMillis();
System.out.println("Client: connected. Millis: " + (t1 - t0));
socket.close();
}
public static void runServer() throws Exception
{
ServerSocket serverSocket = new ServerSocket(PORT);
latch.countDown();
System.out.println("Server: accepting...");
long t0 = System.currentTimeMillis();
serverSocket.accept();
long t1 = System.currentTimeMillis();
System.out.println("Server: accepted. Millis: " + (t1 - t0));
serverSocket.close();
}
public static void main(String[] args) throws Exception
{
Thread thread = new Thread(new Runnable()
{
@Override
public void run()
{
try
{
runClient();
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
});
thread.start();
runServer();
}
}
我应该在@Component(
selector: 'my-app',
template: '<img src="logo.svg">')
class AppComponent {}
属性中添加什么来正确引用徽标?是否有特定的方案可供使用?
答案 0 :(得分:0)
对于Angular 5.0.0,您可以这样引用它:
@Component(
selector: 'my-app',
template: '<img src="packages/angular_app/logo.svg">')
class AppComponent {}
将angular_app
替换为在您的 pubspec.yaml 中定义的名称。