Re: [AngularJS] Re: Angular with jQuery -> Issue

2018-09-04 Thread ACHARYA ANIL KUMAR
Hi firstly use should use rendere2 instead of angular but if u don’t want
so use declare global. Variable for jQuery then use

On Tue, 4 Sep 2018 at 3:54 PM, khushbu poddar 
wrote:

> Hello,
>
> To include JQuery in your angular application, I have added jquery file
> path in angular-cli.json file (apps.scripts)
>
> {
>   XX
>   "apps": [
> {
>   "root": "src",
>   "outDir": "dist",
>   "assets": [
> "assets",
> "assets/img/favicon.ico"
>   ],
>   "index": "index.html",
>   "main": "main.ts",
>   "polyfills": "polyfills.ts",
>   "test": "test.ts",
>   "global-types": "global-types.ts",
>   "tsconfig": "tsconfig.app.json",
>   "testTsconfig": "tsconfig.spec.json",
>   "prefix": "app",
>   "styles": [
> "../node_modules/jqueryui/jquery-ui.css"
>   ],
>   "scripts": [
> "assets/js/bootstrap/jquery-3.2.1.slim.min.js",
> "assets/js/bootstrap/popper.min.js",
> "../node_modules/jquery/dist/jquery.min.js",
> "assets/js/bootstrap/bootstrap.min.js",
>   ],
>   "environmentSource": "environments/environment.ts",
>   "environments": {
> "dev": "environments/environment.ts",
> "prod": "environments/environment.prod.ts"
>   }
> }
>   ],
>   "e2e": {
> "protractor": {
>   "config": "./protractor.conf.js"
> }
>   },
>   "lint": [
> {
>   "project": "src/tsconfig.app.json"
> },
> {
>   "project": "src/tsconfig.spec.json"
> },
> {
>   "project": "e2e/tsconfig.e2e.json"
> }
>   ],
>   "test": {
> "karma": {
>   "config": "./karma.conf.js"
> }
>   },
>   "defaults": {
> "styleExt": "scss",
> "component": {
>   "spec": false
> }
>   }
> }
>
>
>
> On Tue, Sep 4, 2018 at 1:36 PM Stéphane Ancelot 
> wrote:
>
>> JQuery and angular are two kinds of technology I would never mix.
>> You should consider JQuery deprecated.
>>
>> Le mercredi 29 août 2018 16:46:48 UTC+2, Felipe 0liveira a écrit :
>>>
>>> Hey guys, what's going on?
>>>
>>> I have a Angular 5 project which imports on index.html my modified
>>> jQuery lib from my repository! It's in a script:src's tag on index.html:
>>>
>>> 
>>> 
>>>
>>> 
>>>  
>>>  My Application
>>>
>>>   
>>>  
>>>  
>>>
>>>   https://myrepo/css/animate.min.css";>
>>>  https://myrepo/css/bootstrap-theme.css";>
>>>  https://myrepo/css/bootstrap.min.css";>
>>>  
>>>
>>> 
>>>
>>> 
>>>  
>>>
>>>   https://myrepo/js/jquery.min.js";>
>>>  https://myrepo/js/popper.min.js";>
>>>  https://myrepo/js/bootstrap.min.js";>
>>> 
>>>
>>> 
>>>
>>>
>>> I'm using at this way because I can't import a script on
>>> .angular-cli.json file by a link, right?
>>>
>>> To work with jQuery on Angular I just needed to add:
>>> declare var $: any;
>>> at the top of the component that I want to use jQuery!
>>>
>>> *Bt*, when I run the angular unit test script ng test, I
>>> get several errors because jQuery is not know!
>>> Then I installed jQuery from NPM in the project and I have imported to
>>> project scripts and Success! The test Run!
>>>
>>> *BUT *all jQuery functions in application stop working!
>>>
>>> DA!
>>>
>>> What do I have to do?
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Angular and AngularJS discussion" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to angular+unsubscr...@googlegroups.com.
>> To post to this group, send email to angular@googlegroups.com.
>> Visit this group at https://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Thanks and Regards

Anil Kumar

S/W Engineer |  Patanjali Social Activist | Speaker |Yoga Trainer

 Mob:- +918930068008

 My Social Media Links

Facebook:- *https://www.facebook.com/acharyaks90
*

Twitter:-   *https://twitter.com/acharyaks90
*

Github:-   *https://github.com/acharyaks90
*

LinkedIn:- https://www.linkedin.com/in/acharyaks90/

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For mo

Re: [AngularJS] Re: Angular with jQuery -> Issue

2018-09-04 Thread khushbu poddar
Hello,

To include JQuery in your angular application, I have added jquery file
path in angular-cli.json file (apps.scripts)

{
  XX
  "apps": [
{
  "root": "src",
  "outDir": "dist",
  "assets": [
"assets",
"assets/img/favicon.ico"
  ],
  "index": "index.html",
  "main": "main.ts",
  "polyfills": "polyfills.ts",
  "test": "test.ts",
  "global-types": "global-types.ts",
  "tsconfig": "tsconfig.app.json",
  "testTsconfig": "tsconfig.spec.json",
  "prefix": "app",
  "styles": [
"../node_modules/jqueryui/jquery-ui.css"
  ],
  "scripts": [
"assets/js/bootstrap/jquery-3.2.1.slim.min.js",
"assets/js/bootstrap/popper.min.js",
"../node_modules/jquery/dist/jquery.min.js",
"assets/js/bootstrap/bootstrap.min.js",
  ],
  "environmentSource": "environments/environment.ts",
  "environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
  }
}
  ],
  "e2e": {
"protractor": {
  "config": "./protractor.conf.js"
}
  },
  "lint": [
{
  "project": "src/tsconfig.app.json"
},
{
  "project": "src/tsconfig.spec.json"
},
{
  "project": "e2e/tsconfig.e2e.json"
}
  ],
  "test": {
"karma": {
  "config": "./karma.conf.js"
}
  },
  "defaults": {
"styleExt": "scss",
"component": {
  "spec": false
}
  }
}



On Tue, Sep 4, 2018 at 1:36 PM Stéphane Ancelot 
wrote:

> JQuery and angular are two kinds of technology I would never mix.
> You should consider JQuery deprecated.
>
> Le mercredi 29 août 2018 16:46:48 UTC+2, Felipe 0liveira a écrit :
>>
>> Hey guys, what's going on?
>>
>> I have a Angular 5 project which imports on index.html my modified jQuery
>> lib from my repository! It's in a script:src's tag on index.html:
>>
>> 
>> 
>>
>> 
>>  
>>  My Application
>>
>>   
>>  
>>  
>>
>>   https://myrepo/css/animate.min.css";>
>>  https://myrepo/css/bootstrap-theme.css";>
>>  https://myrepo/css/bootstrap.min.css";>
>>  
>>
>> 
>>
>> 
>>  
>>
>>   https://myrepo/js/jquery.min.js";>
>>  https://myrepo/js/popper.min.js";>
>>  https://myrepo/js/bootstrap.min.js";>
>> 
>>
>> 
>>
>>
>> I'm using at this way because I can't import a script on
>> .angular-cli.json file by a link, right?
>>
>> To work with jQuery on Angular I just needed to add:
>> declare var $: any;
>> at the top of the component that I want to use jQuery!
>>
>> *Bt*, when I run the angular unit test script ng test, I get
>> several errors because jQuery is not know!
>> Then I installed jQuery from NPM in the project and I have imported to
>> project scripts and Success! The test Run!
>>
>> *BUT *all jQuery functions in application stop working!
>>
>> DA!
>>
>> What do I have to do?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angular with jQuery -> Issue

2018-09-04 Thread Stéphane Ancelot
JQuery and angular are two kinds of technology I would never mix.
You should consider JQuery deprecated.

Le mercredi 29 août 2018 16:46:48 UTC+2, Felipe 0liveira a écrit :
>
> Hey guys, what's going on?
>
> I have a Angular 5 project which imports on index.html my modified jQuery 
> lib from my repository! It's in a script:src's tag on index.html:
>
> 
> 
>
> 
>  
>  My Application
>
>   
>  
>  
>
>   https://myrepo/css/animate.min.css";>
>  https://myrepo/css/bootstrap-theme.css";>
>  https://myrepo/css/bootstrap.min.css";>
>  
>  
> 
>
> 
>  
>
>   https://myrepo/js/jquery.min.js";>
>  https://myrepo/js/popper.min.js";>
>  https://myrepo/js/bootstrap.min.js";>
> 
>
> 
>
>
> I'm using at this way because I can't import a script on .angular-cli.json 
> file by a link, right?
>
> To work with jQuery on Angular I just needed to add:
> declare var $: any;
> at the top of the component that I want to use jQuery!
>
> *Bt*, when I run the angular unit test script ng test, I get 
> several errors because jQuery is not know!
> Then I installed jQuery from NPM in the project and I have imported to 
> project scripts and Success! The test Run!
>
> *BUT *all jQuery functions in application stop working!
>
> DA!
>
> What do I have to do?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.