calling setBaseTestProviders results in NoAnnotationError

124 views
Skip to first unread message

Shaddy Zeineddine

unread,
May 24, 2016, 6:03:10 PM5/24/16
to AngularJS
doing this...

// assume testing = ('@angular/core/testing')
// assume providers = ('@angular/platform-browser-dynamic/testing')
testing.setBaseTestProviders(providers.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, providers.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);

causes this...

Error: Cannot resolve all parameters for 'ViewUtils'(RootRenderer, undefined @Inject(Token AppId), SanitizationService). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'ViewUtils' is decorated with Injectable.

Shaddy Zeineddine

unread,
May 24, 2016, 6:25:27 PM5/24/16
to AngularJS
When I swallow the error, it seems to continue and work

            try {
              testing.setBaseTestProviders(providers.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, providers.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
            } catch (err) {
              console.log(err);

Eyal Ellenbogen

unread,
May 31, 2016, 4:23:45 AM5/31/16
to AngularJS
I was getting the same error. Make sure your system.config is not packaging the files using umd.

see system.config.js in the quickstart

Shaddy Zeineddine

unread,
May 31, 2016, 1:10:00 PM5/31/16
to ang...@googlegroups.com
Thanks! That was the problem.

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/VmwrEMKsm70/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

ruben valas

unread,
Jul 14, 2016, 2:15:09 PM7/14/16
to AngularJS
I have the same problem. I'm using a system.js.config based off the quick start. Can you show me what you changed to get this to work?

Shaddy Zeineddine

unread,
Jul 14, 2016, 2:31:56 PM7/14/16
to ang...@googlegroups.com
As Eyal Ellenbogen informed me....


"I was getting the same error. Make sure your system.config is not packaging the files using umd.

see system.config.js in the quickstart

Reply all
Reply to author
Forward
0 new messages