You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
When creating a vanilla angular-cli project and adding signalr-client (currently alpha1 26666) the app crashes when trying to reference any members exposed from the import statement.
This occurs at the point the members are actually referenced: the act of including the members in the code file doesn't trigger the error - I'm assuming that is because of lazy loading the resources when they are actually used, but that's of course outside my area.
This occurs both in dev and prod builds. In my case it originally broke in a angular-cli based .net core project, however I was easily able to reproduce the same outcome in a vanilla angular-cli project.
Note I am using yarn, however that shouldn't make any difference
To reproduce the issue, I did the following:
Create a new angular-cli project ng new test-signalr-client
[I saved the initial commit in the auto-created git repo]
I added the signalr-client - to do this in yarn I followed the following steps :-
a. yarn config get registry (so I can revert back afterwards)
b. yarn config set registry https://dotnet.myget.org/f/aspnetcore-ci-dev/npm/
c. yarn add signalr-client
d. yarn config set registry https://registry.yarnpkg.com (to revert back to standard yarn registry)
[Saved commit]
Amended the app.component.cs as follows:-
import { TransferMode } from 'signalr-client';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'app works!';
ngOnInit() {
var x = TransferMode.Binary;
}
}
ng serve or ```ng serve --prod``
Open dev tools in the browser, and view the console errors.
Although this is an alpha build, it goes without saying that there's no point even trying to integrate this new "style" of signalr into a .net core/angular-cli project until this is resolved